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

compact_prios exceeds max_levels #53

Closed
skyzh opened this issue Nov 24, 2020 · 4 comments
Closed

compact_prios exceeds max_levels #53

skyzh opened this issue Nov 24, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@skyzh
Copy link
Member

skyzh commented Nov 24, 2020

This panic is not guaranteed to be triggered. Will look into details later.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/skyzh/.cargo/git/checkouts/yatp-e704b73c3ee279b6/6bbea16/src/pool.rs:46:26
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/core/src/option.rs:1268:5
   3: core::result::Result<T,E>::unwrap
             at /home/skyzh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:973:23
   4: yatp::pool::ThreadPool<T>::shutdown
             at /home/skyzh/.cargo/git/checkouts/yatp-e704b73c3ee279b6/6bbea16/src/pool.rs:46:17
   5: <agatedb::db::Agate as core::ops::drop::Drop>::drop
             at ./src/db.rs:98:9
   6: core::ptr::drop_in_place
             at /home/skyzh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:175:1
   7: agatedb::db::tests::with_agate_test::{{closure}}
             at ./src/db.rs:617:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@skyzh skyzh added the bug Something isn't working label Nov 24, 2020
@skyzh
Copy link
Member Author

skyzh commented Nov 24, 2020

The reason seems to be that the thread panics before pool shutdown. Not an issue related to yatp.

thread 'agatedb-5' panicked at 'assertion failed: level + 1 < self.opts.max_levels', src/levels.rs:534:9

@skyzh skyzh changed the title yatp shutdown panic in test compact_prios exceeds max_levles Nov 24, 2020
@skyzh skyzh changed the title compact_prios exceeds max_levles compact_prios exceeds max_levels Nov 24, 2020
@skyzh
Copy link
Member Author

skyzh commented Nov 25, 2020

It seems that badger would panic if last level is full https://github.com/dgraph-io/badger/blob/master/levels.go#L1318

@skyzh
Copy link
Member Author

skyzh commented Nov 25, 2020

Last level will never be in compact_prios https://github.com/dgraph-io/badger/blob/master/levels.go#L556

@skyzh
Copy link
Member Author

skyzh commented Nov 25, 2020

Fixed in c2dd96d

@skyzh skyzh closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant