Uploaded image for project: 'Kite SDK'
  1. Kite SDK
  2. KITE-123

HCatalogMetadataProvider leaks a reference to its internal data directory, which changes.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0, 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: Data Module
    • Labels:
      None

      Description

      HCatalogDatasetRepository#get calls HCatalogMetadataProvider#load, which sets the provider's internal dataDirectory variable. Then, get leaks that value by returning an inline class:

      new FileSystemDatasetRepository(
                metadataProvider.getFileSystem(),
                  /* unused */ metadataProvider.getDataDirectory().getParent(),
                metadataProvider) {
              @Override
              protected Path pathForDataset(String name) {
                return metadataProvider.getDataDirectory();
              }
            };
      

      If get is called twice, the provider's internal directory changes, but both FileSystemDataRepository instances point to the same value.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                blue Ryan Blue
                Reporter:
                blue Ryan Blue
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: