symious commented on PR #10822: URL: https://github.com/apache/ozone/pull/10822#issuecomment-5423571160
@sodonnel Thank you for the review. > Would it make sense to ensure that the versioned table has all keys? Today versionedKeyTable holds only immutable history: once written, a record is never touched again. Duplicating the current version makes it a mutable record living in two tables, so SetAcl, rename (which changes the dbKey), hsync appends and MPU commits all have to keep both copies in sync, and missing one is a silent divergence. The migration it would avoid isn't actually costing us anything. On commit the superseded version is already in hand — it's read for the overwrite handling anyway — so moving it is a single put. Both layouts are two puts on an overwrite, and the double write is two puts on a first write as well, where today it's one. And the point lookup is deterministic rather than a search: check the current version's ID first (that read is needed anyway), and if it doesn't match, do an exact get on versionedKeyTable at (key, versionId). At most two point gets, no scan. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
