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

level: fix index in move_l0_to_front #192

Merged
merged 5 commits into from
Feb 28, 2023
Merged

Conversation

Tianion
Copy link
Contributor

@Tianion Tianion commented Feb 20, 2023

move_l0_to_front moves level0 to the front, and the others remain unchanged.
But it use 'idx' not 'pos'

@skyzh
Copy link
Member

skyzh commented Feb 20, 2023

Would you please sign DCO? Thanks!

@Tianion
Copy link
Contributor Author

Tianion commented Feb 21, 2023

Would you please sign DCO? Thanks!

Done.

@skyzh
Copy link
Member

skyzh commented Feb 22, 2023

hmm... still need to fix CI errors. Would you please check format / clippy / tests? Thanks!

@Tianion
Copy link
Contributor Author

Tianion commented Feb 23, 2023

Still need to fix CI errors.... It's a bit frustrating.
Maybe we should create an issue in yatp? @skyzh This change makes it compile error.
tikv/yatp@39cb495

Now use cargo check in agatedb is ok.

 agatedb git:(fix_pos_move_l0) cargo check
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s

but in agate_bench

agate_bench git:(fix_pos_move_l0) cargo check
   Compiling tikv-jemalloc-sys v0.4.3+5.2.1-patched.2
    Checking yatp v0.0.1 (https://github.com/tikv/yatp.git#7ed25299)
error[E0599]: no method named `steal_batch_with_limit_and_pop` found for struct `Injector` in the current scope
   --> /root/.cargo/git/checkouts/yatp-e704b73c3ee279b6/7ed2529/src/queue/multilevel.rs:183:37
    |
183 |         self.level_injectors[level].steal_batch_with_limit_and_pop(&self.local_queue, steal_limit)
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `steal_batch_and_pop`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `yatp` due to previous error

in skiplist

skiplist git:(fix_pos_move_l0) cargo check
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s

@skyzh
Copy link
Member

skyzh commented Feb 27, 2023

Thanks a lot!

@skyzh
Copy link
Member

skyzh commented Feb 27, 2023

We probably need to add Cargo.lock so that the patch will be applied...

@skyzh
Copy link
Member

skyzh commented Feb 27, 2023

I'll take a look later :)

@Tianion
Copy link
Contributor Author

Tianion commented Feb 28, 2023

We probably need to add Cargo.lock so that the patch will be applied...

Could a lib add cargo.lock...? It seems strange.

@Tianion
Copy link
Contributor Author

Tianion commented Feb 28, 2023

I check command, and find make clippy : cargo clippy --all-targets --all-features --workspace -- -D "warnings".
now, It should be ok.

➜  agatedb git:(fix_pos_move_l0) ✗ cargo clippy --all-targets --all-features --workspace -- -D "warnings"
    Checking agatedb v0.1.0 (/root/agatedb)
    Checking agate_bench v0.1.0 (/root/agatedb/agate_bench)
    Finished dev [unoptimized + debuginfo] target(s) in 1.94s

@skyzh
Copy link
Member

skyzh commented Feb 28, 2023

We probably need to add Cargo.lock so that the patch will be applied...

Could a lib add cargo.lock...? It seems strange.

Yeah, because the upstream library is using a patch + lock... So I think it would be fine for now. We can remove it later.

@skyzh
Copy link
Member

skyzh commented Feb 28, 2023

But it seems that it already works, so I would prefer merging it without adding Cargo.lock for now.

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Merging #192 (a8b584c) into master (070ff80) will decrease coverage by 0.04%.
The diff coverage is 91.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   89.63%   89.60%   -0.04%     
==========================================
  Files          39       39              
  Lines        8838     8838              
==========================================
- Hits         7922     7919       -3     
- Misses        916      919       +3     

@skyzh skyzh merged commit bb041a7 into tikv:master Feb 28, 2023
@Tianion Tianion deleted the fix_pos_move_l0 branch February 28, 2023 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants