persist: address a batch of encoding TODOs#9338
Conversation
It's derivable from id_mapping and graveyard and so unnecessary.
Resolving the associated TODO.
Our usage of Description for data timestamps in trace batches is correct, but somewhat just because it was there, we also used it for declaring SeqNo bounds of unsealed batches. In that role, it's correct, but unnecessary. First, we never compact anything on a SeqNo basis, so the since is always "zero" (the single element antichain of the minimum SeqNo). Second, SeqNos are totally ordered and always will be, so there's no need for the lower and upper bounds to be Antichain (as Description hardcodes). In theory, Description is just a superset of the information we need to represent and our usage of it was correct. In practice, the Antichain caused some bits of code to be unnecessarily complicated and we probably weren't being defensive about erroring on non-"zero" sinces.
To mirror the previous merge of the in-mem Unsealed and Trace into Arrangement.
|
haven't looked at this in detail, but one small thought here is -- maybe do we want to bump meta/update the golden test on each commit? I guess the two cases I'm thinking about are:
I dunno how compelling either of those reasons are, and I know bumping meta/updating golden each time is tedious. Wasn't sure if doing it each time also came with other downsides. No strong preference either way, so feel free to leave it as is if you feel strongly |
|
I was 50/50 on this. Tbh, neither of those reasons are particularly compelling to me, but it's easy enough to switch that 51/49 is worth it. I'll have to force push it though, there's no way to model this as fixup commits, have you started reviewing yet? If so, I'll just do it after the LGTM |
|
I'll review asap -- gimme like 15 minutes (ive already seen most of these changes so it shouldn't take long) |
Of the two, this is more compelling. In theory I agree with it. In practice, no one is going to want to revert any of these commits individually. Setting a good precedent is probably where I go from 50/50 to 51/49 on this :)
This to me is a non-goal. I have a reasonably strong opinion that the unit of atomic work is a PR, not a commit. I suppose this also negates (1) a bit, but I'm still willing to change it. |
ruchirK
left a comment
There was a problem hiding this comment.
LGTM! First 4 commits and last commit definitely look good -- id love to do another quick pass over the ArrangementMeta commit after lunch but it seems totally reasonable. feel free to force push!
| /// - The compaction level of trace_batches is weakly decreasing when iterating | ||
| /// from oldest to most recent time intervals. | ||
| /// - Every trace_batch's upper is <= the overall trace's seal frontier. | ||
| /// - TODO: key uniqueness invariants? |
There was a problem hiding this comment.
i think this todo is a bit stale -- we already enforce that all blob keys are globally unique across all arrangements in BlobMeta
There was a problem hiding this comment.
🤦 Totally blanked on this, I'll fix it in the next PR.
I think I agree with that, with the one exception that commits that crash on startup could make git bisection difficult unless theres a way to git bisect across pr boundaries (maybe that difficulty is already baked in with how we handle old versions of meta idk?) |
|
|
I just went and did this rebase, but didn't push it because I think I've changed my mind. Thoughts on the following?
|
|
Sounds like we should leave it as is. The reasons for changing were never super strong, and I think I'm most convinced by the fact that the version bumps we have available are a finite resource and it would be genuinely annoying to exhaust that. |
|
Did you get a chance to look at the ArrangementMeta commit to your satisfaction? |
|
Yup I did! sorry should have mentioned that earlier |
|
No worries! TFTR! |
This is a single bump to cover the other commits in this PR.
81d9e0c to
ea74a45
Compare
|
Doh! I was supposed to hold this until after the 0.11.0 release got cut but totally brain farted on it. Opening up a revert now |
See individual commits for details.
Motivation
Cleanups in prep for protobuf encoding of BlobMeta.
Tips for reviewer
I left the unsealed_ts_upper here as a TODO because the rest of this PR is really straightforward refactoring and I wanted to keep it really easy to review. I'll get to it this week.
Checklist
user-facing behavior changes.