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

fix(over window): fix over window range cache shortcut return #14311

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

stdrc
Copy link
Contributor

@stdrc stdrc commented Jan 2, 2024

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

What's changed and what's your intention?

Previously the extend_cache_by_range(self, table, range: RangeInclusive<&StateKey>) method wrongly shortcut returned after loading the left half of range, pseudo-code like below:

if left_extendable && range.start < first_key_in_cache {
  return extend_cache_by_range_inner(Range(Include(range.start), Exclude(first_key_in_cache)));
}

if right_extendable && range.end > last_key_in_cache {
  return extend_cache_by_range_inner(Range(Exclude(last_key_in_cache), Include(range.end)));
}

But it actually should be:

if left_extendable && range.start < first_key_in_cache {
  extend_cache_by_range_inner(Range(Include(range.start), Exclude(first_key_in_cache)));
}

if right_extendable && range.end > last_key_in_cache {
  extend_cache_by_range_inner(Range(Exclude(last_key_in_cache), Include(range.end)));
}

This PR correct it and re-enable e2e tests for range cache.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
@stdrc stdrc added this pull request to the merge queue Jan 3, 2024
Merged via the queue into main with commit 5417d18 Jan 3, 2024
32 of 33 checks passed
@stdrc stdrc deleted the rc/fix-range-cache-new branch January 3, 2024 02:59
xxhZs pushed a commit that referenced this pull request Jan 4, 2024
Signed-off-by: Richard Chien <stdrc@outlook.com>
xxhZs added a commit that referenced this pull request Jan 4, 2024
fix

chore: fix typos linted by cSpell (#14306)

Signed-off-by: TennyZhuang <zty0826@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

fix(over window): fix over window range cache shortcut return (#14311)

Signed-off-by: Richard Chien <stdrc@outlook.com>

fix(stream): rowIdGen executor handle invisible delete record (#14237)

feat(storage): Improve task measurement on the compactor side with parallelism (#13812)

feat: introduce rw_streaming_parallelism system view (#14261)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: Add type check to alter parallelism statement. (#14323)

Signed-off-by: Shanicky Chen <peng@risingwave-labs.com>

refactor(error): add more context for jvm error (#14302)

chore: update help message for scale command (#14332)

Signed-off-by: Shanicky Chen <peng@risingwave-labs.com>

fix: fix panic in `ctl meta source-split-info` (#14334)

Signed-off-by: Shanicky Chen <peng@risingwave-labs.com>

test(streaming): add fuzz test for materialize handle conflict (#14166)

add mock coordination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants