Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(logstore): handle paused stream #20511

Merged
merged 1 commit into from
Feb 27, 2025
Merged

feat(logstore): handle paused stream #20511

merged 1 commit into from
Feb 27, 2025

Conversation

kwannoel
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

Copy link
Contributor Author

kwannoel commented Feb 17, 2025

@kwannoel kwannoel force-pushed the kwannoel/handle-pause branch from 9c3f223 to aa35e12 Compare February 18, 2025 04:12
@kwannoel kwannoel changed the title handle pause stream feat(logstore): handle paused stream Feb 18, 2025
@kwannoel kwannoel marked this pull request as ready for review February 18, 2025 04:16
@kwannoel kwannoel requested a review from wenym1 February 18, 2025 04:45
Copy link
Contributor

@wenym1 wenym1 left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@@ -430,6 +451,9 @@ impl<S: StateStoreRead> ReadFuture<S> {
*self = ReadFuture::Idle;
}
ReadFuture::ReadingFlushedChunk { .. } | ReadFuture::Idle => {}
ReadFuture::Paused => {
unreachable!("should not be polled after paused")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can just move the return pending().await at the beginning to here to avoid an extra match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -260,6 +260,7 @@ impl<S: StateStore> SyncedKvLogStoreExecutor<S> {
new_log_store_state(self.table_id, local_state_store, self.serde);
initial_write_state.init(first_write_epoch).await?;

let mut pause_stream = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

May set the initial value as barrier.is_pause_on_startup()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@kwannoel kwannoel requested a review from wenym1 February 25, 2025 05:34
@kwannoel kwannoel force-pushed the kwannoel/handle-pause branch from aa35e12 to 78b0623 Compare February 25, 2025 05:34
@kwannoel kwannoel force-pushed the kwannoel/handle-pause branch from 78b0623 to 78df558 Compare February 25, 2025 12:49
@kwannoel kwannoel requested a review from wenym1 February 25, 2025 12:50
Copy link
Contributor

@wenym1 wenym1 left a comment

Choose a reason for hiding this comment

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

LGTM

@kwannoel kwannoel force-pushed the kwannoel/handle-pause branch 3 times, most recently from 80359d9 to 52d2229 Compare February 27, 2025 08:41
@kwannoel kwannoel force-pushed the kwannoel/handle-pause branch from 52d2229 to d318c81 Compare February 27, 2025 08:47
@kwannoel kwannoel added this pull request to the merge queue Feb 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@kwannoel kwannoel added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit faa6cb6 Feb 27, 2025
28 of 29 checks passed
@kwannoel kwannoel deleted the kwannoel/handle-pause branch February 27, 2025 16:37
Standing-Man pushed a commit to Standing-Man/risingwave that referenced this pull request Feb 28, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants