Skip to content

Conversation

@joefutrelle
Copy link
Contributor

  • caches bin path in the Bin model, along with the DataDirectory it was found in
  • uses the cache unless the cache is explicitly invalidated by setting path to the empty string, in which case the next access will look in the originating data directory first before caching

@joefutrelle joefutrelle self-assigned this Aug 14, 2025
@joefutrelle
Copy link
Contributor Author

This logic is now problematic:

if not created and not self.dataset in b.datasets:
self.dataset.bins.add(b)
return

because if a dataset is synced and a bin has been removed from that dataset but its files are still in the relevant data directory, it will be re-added to the dataset. I think it can simply be removed, since the rest of the 4.5.0 branch provides it and other features for managing datasets.

The correct logic is now to simply return if the bin already exists.

@joefutrelle joefutrelle marked this pull request as ready for review August 14, 2025 18:21
@joefutrelle joefutrelle changed the title [WIP] bin path caching bin path caching Aug 14, 2025
Copy link
Collaborator

@mike-kaimika mike-kaimika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. I agree with the comment you left about not re-adding the bin back to the dataset

@mike-kaimika mike-kaimika added this to the 4.5 milestone Aug 17, 2025
@joefutrelle
Copy link
Contributor Author

@mike-kaimika do we want to push this to before the public 4.5?

@mike-kaimika
Copy link
Collaborator

@joefutrelle I do not have any objections to doing so. The more we can (safely) get merged in this next release, the less there will be to the already significant release we'd be doing for the other functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants