-
Notifications
You must be signed in to change notification settings - Fork 483
Frontend peek sequencing -- RTR #34238
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
Conversation
8f87429 to
fcbd0aa
Compare
|
|
||
| match result { | ||
| Ok(Some(fut)) => { | ||
| task::spawn(|| "determine real time recent timestamp", async move { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This corresponds to the spawning in the old peek sequencing's peek_real_time_recency.
| &self, | ||
| source_ids: impl Iterator<Item = GlobalId>, | ||
| real_time_recency_timeout: Duration, | ||
| ) -> Result<Option<BoxFuture<'static, Result<Timestamp, StorageError<Timestamp>>>>, AdapterError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This big green block is mostly just code movement from the old determine_real_time_recent_timestamp's inner part.
fcbd0aa to
f0b69ff
Compare
aljoscha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changes look fine, and I'm counting on tests here to work correctly
| ---- | ||
| COMPLETE 0 | ||
|
|
||
| # TODO(ggevay): I think this is not actually testing real-time recency, because tables don't participate in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
This PR makes progress on https://github.com/MaterializeInc/database-issues/issues/9593, implementing real-time recency support in the new peek sequencing, so that we have one less fallback to the old peek sequencing.
I decided to not pull the infra that is need for RTR from the Coordinator to the Frontend, but just added a Coordinator command that the Frontend can use to ask the Coordinator for an RTR timestamp. The roundtrip for this command takes some time and could conceivably be a Coordinator main task bottleneck, but should be ok for now. RTR is quite slow anyway, and GA'ing it is not a high priority at the moment, according to the roadmap item in Notion.
Note that we are reaching into
sequencer/innerfrom the outside (fromcommand_handler.rs), which is not nice. I'd like to resolve this later, when we remove the old peek sequencing code, at which point we'll find some nice place for such currentlyinnerfunctions that are accessed by the frontend peek sequencing. I've added this to the "Important refactorings" section of https://github.com/MaterializeInc/database-issues/issues/9593Nightly: https://buildkite.com/materialize/nightly/builds/14153 The failures seem unrelated to this PR.
Note that the PR currently has an extra commit to turn on
enable_frontend_peek_sequencingin CI, so that CI tests the new code. I'll remove this commit before merging the PR, as discussed earlier.