Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-61297

[CBM] tmpdir never deleted due to forward slash in base64 encoding

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes
    • Tools 2024-Q1

    Description

      What is the problem?
      For the temporary directory we added as part of MB-53226 we create a directory of the form <pid>-<4 chars of hostname hash> so we can quickly decide whether we need to remove a directory. Unfortunately the default base64 alphabet includes forward slashes.

      For machines whose first four base64 encoding of their hash has a forward slash this means their temporary directory will never be deleted.

      This was found on this Jenkins run.

      What is the user impact?
      In normal operation there should be near none - the temporary directory will exist but will not take up disk space as SQLite will have cleaned up its temporary files. If a backup or restore is interrupted at the right point files may be left over however.

      What is the solution?
      We should use the URL encoding as this is also safe for file paths.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            gilad.kalchheim Gilad Kalchheim
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty