Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delta_layer: Restore generic from last week #5014

Merged
merged 4 commits into from
Aug 17, 2023
Merged

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented Aug 16, 2023

Restores #4937 work relating to the ability to use ResidentDeltaLayer (which is an Arc wrapper) in #4938 for the ValueRef's by removing the borrow from ValueRef and providing it from an upper layer.

This should not have any functional changes, most importantly, the main will continue to use the borrowed DeltaLayerInner. It might be that I can change #4938 to be like this. If that is so, I'll gladly rip out the Ref and move the borrow back. But I'll first want to look at the current test failures.

Copy link
Member

@arpad-m arpad-m left a comment

Choose a reason for hiding this comment

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

This isolates the most conflict causing part of #4938 : With what I propose for the BlockReader trait, DeltaEntry will become completely non-generic again, as well as ValueRef. As a result, the changes of this PR will probably mostly be gone again. I don't know of a better way how to address this though than to merge it and then remove it again in my PR, then at least there is less rebase effort on the side of #4938.

@github-actions
Copy link

1596 tests run: 1520 passed, 0 failed, 76 skipped (full report)


The comment gets automatically updated with the latest test results
805af76 at 2023-08-16T19:51:53.622Z :recycle:

@koivunej koivunej merged commit d3612ce into main Aug 17, 2023
@koivunej koivunej deleted the restore_generification branch August 17, 2023 08:47
koivunej added a commit that referenced this pull request Oct 26, 2023
…#4938)

Implement a new `struct Layer` abstraction which manages downloadness
internally, requiring no LayerMap locking or rewriting to download or
evict providing a property "you have a layer, you can read it". The new
`struct Layer` provides ability to keep the file resident via a RAII
structure for new layers which still need to be uploaded. Previous
solution solved this `RemoteTimelineClient::wait_completion` which lead
to bugs like #5639. Evicting or the final local deletion after garbage
collection is done using Arc'd value `Drop`.

With a single `struct Layer` the closed open ended `trait Layer`, `trait
PersistentLayer` and `struct RemoteLayer` are removed following noting
that compaction could be simplified by simply not using any of the
traits in between: #4839.

The new `struct Layer` is a preliminary to remove
`Timeline::layer_removal_cs` documented in #4745.

Preliminaries: #4936, #4937, #5013, #5014, #5022, #5033, #5044, #5058,
#5059, #5061, #5074, #5103, epic #5172, #5645, #5649. Related split off:
#5057, #5134.
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.

2 participants