[ENH] Make storage_prefix_for_log a property of the CollectionUuid. - #4835
Conversation
|
This PR refactors how the log storage prefix is determined by moving the storage_prefix_for_log functionality from a standalone function in the log-service crate to a method on the CollectionUuid type in the types crate. All usages have been updated to call this new method, ensuring that any component with a CollectionUuid can directly compute its log storage path. This summary was automatically generated by @propel-code-bot |
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
HammadB
left a comment
There was a problem hiding this comment.
Is there a compelling reason for this change? I'd argue it breaks encapsulation of the collection type from the storage layout of the log. The log should know where it wants to keep collections. The collection shouldn't say where it wants to be stored
|
@HammadB Yes. I need this information to be known by the garbage collector that calls wal3::LogWriter::garbage_collect. It cannot stay in log-service without linking that whole crate into garbage collector. This was the most logical place. |
161882b to
a339697
Compare
…hroma-core#4835) ## Description of changes This creates a method on the CollectionUuid that says its prefix relative to the storage root. ## Test plan CI ## Documentation Changes N/A
Description of changes
This creates a method on the CollectionUuid that says its prefix relative to the storage root.
Test plan
CI
Documentation Changes
N/A