-
Notifications
You must be signed in to change notification settings - Fork 594
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
refactor(storage): remove enable_test_epoch
and modify epochs used by all unit tests to be realistic
#14557
Conversation
…nto wcy/remove_enable_test_epoch
enable_test_epoch
and modify epochs used by all unit tests to be realistic[WIP]enable_test_epoch
and modify epochs used by all unit tests to be realistic
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.
Please review all changes by yourself after changing some critical part, like introducing a constant or function to avoid magic numbers. IMO the magic numbers in this PR will be extremely hard to eliminate after got merged and will significantly decrease the maintainability of our tests.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9425213 | Triggered | Generic Password | 7e02709 | ci/scripts/regress-test.sh | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
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.
Rest LGTM! Thanks for the great works to resolve the conflict!
The PR can be merged after all comments are resolved.
I will go ahead to find out the reason of unit test timeout. |
The unit test run time looks good in the recent commit: https://buildkite.com/risingwavelabs/pull-request/builds/43799#_ |
Yes, I have change the timeout to origin 22mins to see whether it can pass. |
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.
It is much cleaner. Thanks for the great efforts!
use risingwave_hummock_sdk::key::{FullKey, TableKey}; | ||
|
||
use super::{CompactionFilter, TtlCompactionFilter}; | ||
|
||
#[test] | ||
fn test_ttl_u32() { | ||
let mut ttl_filter = TtlCompactionFilter::new(HashMap::from_iter([(1, 4000000000)]), 1); | ||
ttl_filter.should_delete(FullKey::new(TableId::new(1), TableKey(vec![]), 1).to_ref()); | ||
ttl_filter |
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.
cc @Li0k PTAL
@@ -217,7 +218,7 @@ pub mod sled { | |||
table_id, | |||
table_key: TableKey(Bytes::from(table_key.to_vec())), | |||
}, | |||
epoch_with_gap: EpochWithGap::new_from_epoch(epoch), | |||
epoch_with_gap: EpochWithGap::new_from_epoch(epoch & !EPOCH_SPILL_TIME_MASK), |
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.
Will this change the test case? cc @Li0k
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.
Rest LGTM!
Is the file risingwave-test/hummock_001/checkpoint/0
included accidentally?
@@ -146,7 +147,7 @@ where | |||
for mut event in inputs { | |||
match &mut event { | |||
SnapshotEvent::Barrier(epoch) => { | |||
tx.push_barrier(*epoch, false); | |||
tx.push_barrier(test_epoch(*epoch), false); |
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.
It is possible to change to epoch in SnapshotEvent::Barrier
to a correctly shifted value?
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.
A bit hard, let's keep it like this for now.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
As title
close #13884
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 #7934).- [ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future)../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.