refactor: reduce internal EagerSnapshot usage#4567
Conversation
Signed-off-by: Ethan Urbanski <ethan@urbanskitech.com>
Signed-off-by: Ethan Urbanski <ethan@urbanskitech.com>
Signed-off-by: Ethan Urbanski <ethan@urbanskitech.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4567 +/- ##
==========================================
+ Coverage 80.00% 80.03% +0.02%
==========================================
Files 179 179
Lines 64140 64286 +146
Branches 64140 64286 +146
==========================================
+ Hits 51315 51449 +134
+ Misses 9834 9825 -9
- Partials 2991 3012 +21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| let prepared_append = prepare_write(WritePreparationInput { | ||
| snapshot: Some(table_with_snapshot.snapshot().unwrap().snapshot()), | ||
| snapshot: Some( |
There was a problem hiding this comment.
Now with even more .snapshot() !!
Signed-off-by: Ethan Urbanski <ethan@urbanskitech.com>
7c5041f to
42bc8d1
Compare
hntd187
left a comment
There was a problem hiding this comment.
I'll be honest, I think this may shift the usage instead of actually reducing it. There are a lot of places where there was no .snapshot() and now there is a call and a lot of places where there are now more .snapshot() on top of the prior call sites.
I think this needs a bit more re-thinking in general and I think we should just rip the band-aid off. Why did we create different kinds of snapshots in the first place? Because the implementation details are different right? If that is the case is this not something we can collate into a trait and just pass a single "Snapshot" around instead of having to do this snapshot().snapshot().snapshot() things, which seems really ugly. If the different kinds of snapshots are so different they cannot be represented in a single trait then let's discuss more.
Pull request was converted to draft
|
going to keep this as a draft for now with it likely being superseded. A new issue was created to track a more robust snapshot design and future state here #4584. |
This removes internal
EagerSnapshotdependencies where the code can useSnapshot,Arc<Snapshot>, active add APIs, tombstone APIs,DeltaScanNext, orFileSelectiondirectly. Public compatibility stays intact.