upstream(core): Add input object notify in the writeback cache#11170
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
bingyanglin
left a comment
There was a problem hiding this comment.
We should port the whole PR MystenLabs/sui#21995 instead of this single commit?
semenov-vladyslav
left a comment
There was a problem hiding this comment.
Two major concerns:
- how and where is
notify_read_input_objectsused? - does
MarkerValue::SharedDeletedcorrespondMarkerValue::ConsensusStreamEndedor not?
| } | ||
| } | ||
|
|
||
| fn write_marker_value( |
There was a problem hiding this comment.
It looks like the upstream's MarkerValue::ConsensusStreamEnded corresponds to MarkerValue::SharedDeleted. Should we add MystenLabs/sui@ed70303#diff-79208930f46fbe9a7259e6ec37d86d02b4f61b1537dad95fa2278c57225f087cR595 here?
| if is_available { | ||
| results[*idx] = Some(()); | ||
| } | ||
| } |
There was a problem hiding this comment.
Should there be else if branch eg. else if self.get_last_shared_object_deletion_info(..)
| .unwrap(); | ||
|
|
||
| assert_eq!(result.len(), 1); | ||
| } |
There was a problem hiding this comment.
The upstream commit has tests for ConsensusStreamEnded marker. I am not sure, but it looks like it corresponds to MarkerValue::SharedDeleted. Should we add corresponding tests?
| _receiving_keys: &'a std::collections::HashSet<InputKey>, | ||
| _epoch: &'a EpochId, | ||
| ) -> BoxFuture<'a, Vec<()>> { | ||
| unimplemented!("PassthroughCache does not support notify_read_input_objects") |
There was a problem hiding this comment.
How and where is notify_read_input_objects used? Can we guarantee that passthrough cache is not used when it's called?
Now I get it, it's the missing piece that @semenov-vladyslav mentioned! |
22f2b45 to
3e2c5ed
Compare
Description of change
Adds a
notify_read_input_objectsmethod to theObjectCacheReadtrait and implements it inWritebackCache. This allows transactions to wait until their input objects become available, replacing the need for polling in the transaction manager. Thewrite_object_entrymethod now notifies waiters when objects are written.Links to any relevant issues
Part of #11101
How the change has been tested