Implement vacuum logic #231
rust.yml
on: pull_request
build
1m 26s
clippy_check
32s
Annotations
16 errors and 4 warnings
|
mutable key type:
src/lock/row_lock.rs#L56
error: mutable key type
--> src/lock/row_lock.rs:56:9
|
56 | let set = HashSet::from_iter([self.l.clone()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: ... because it contains `Arc<Lock>`, which has interior mutability
= note: ... because it contains `Lock`, which has interior mutability
= note: ... because it contains `Arc<AtomicBool>`, which has interior mutability
= note: ... because it contains `AtomicBool`, which has interior mutability
= note: ... because it contains `UnsafeCell<u8>`, which has interior mutability
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mutable_key_type
|
|
mutable key type:
src/lock/row_lock.rs#L44
error: mutable key type
--> src/lock/row_lock.rs:44:9
|
44 | let mut set = HashSet::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: ... because it contains `Arc<Lock>`, which has interior mutability
= note: ... because it contains `Lock`, which has interior mutability
= note: ... because it contains `Arc<AtomicBool>`, which has interior mutability
= note: ... because it contains `AtomicBool`, which has interior mutability
= note: ... because it contains `UnsafeCell<u8>`, which has interior mutability
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mutable_key_type
= note: `-D clippy::mutable-key-type` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mutable_key_type)]`
|
|
method `defragment_page` is never used:
src/table/vacuum/mod.rs#L89
error: method `defragment_page` is never used
--> src/table/vacuum/mod.rs:89:14
|
50 | / impl<
51 | | Row,
52 | | PrimaryKey,
53 | | PkNodeType,
... |
86 | | + TableSecondaryIndexCdc<Row, AvailableTypes, SecondaryEvents, AvailableIndexes>,
87 | | AvailableIndexes: Debug + AvailableIndex,
| |_____________________________________________- method in this implementation
88 | {
89 | async fn defragment_page(&self, info: PageFragmentationInfo<DATA_LENGTH>) {
| ^^^^^^^^^^^^^^^
|
|
fields `data_pages`, `vacuum_lock`, `primary_index`, and `secondary_indexes` are never read:
src/table/vacuum/mod.rs#L41
error: fields `data_pages`, `vacuum_lock`, `primary_index`, and `secondary_indexes` are never read
--> src/table/vacuum/mod.rs:41:5
|
27 | pub struct EmptyDataVacuum<
| --------------- fields in this struct
...
41 | data_pages: DataPages<Row, DATA_LENGTH>,
| ^^^^^^^^^^
42 | vacuum_lock: Arc<VacuumLock>,
| ^^^^^^^^^^^
43 |
44 | primary_index: Arc<IndexMap<PrimaryKey, Link, PkNodeType>>,
| ^^^^^^^^^^^^^
45 | secondary_indexes: Arc<SecondaryIndexes>,
| ^^^^^^^^^^^^^^^^^
|
= note: `EmptyDataVacuum` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
|
mutable key type:
src/lock/row_lock.rs#L56
error: mutable key type
--> src/lock/row_lock.rs:56:9
|
56 | let set = HashSet::from_iter([self.l.clone()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: ... because it contains `Arc<Lock>`, which has interior mutability
= note: ... because it contains `Lock`, which has interior mutability
= note: ... because it contains `Arc<AtomicBool>`, which has interior mutability
= note: ... because it contains `AtomicBool`, which has interior mutability
= note: ... because it contains `UnsafeCell<u8>`, which has interior mutability
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mutable_key_type
|
|
mutable key type:
src/lock/row_lock.rs#L44
error: mutable key type
--> src/lock/row_lock.rs:44:9
|
44 | let mut set = HashSet::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: ... because it contains `Arc<Lock>`, which has interior mutability
= note: ... because it contains `Lock`, which has interior mutability
= note: ... because it contains `Arc<AtomicBool>`, which has interior mutability
= note: ... because it contains `AtomicBool`, which has interior mutability
= note: ... because it contains `UnsafeCell<u8>`, which has interior mutability
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mutable_key_type
= note: `-D clippy::mutable-key-type` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mutable_key_type)]`
|
|
methods `lock_page`, `lock_link`, `is_link_locked`, and `is_page_locked` are never used:
src/table/vacuum/lock.rs#L18
error: methods `lock_page`, `lock_link`, `is_link_locked`, and `is_page_locked` are never used
--> src/table/vacuum/lock.rs:18:12
|
16 | impl VacuumLock {
| --------------- methods in this implementation
17 | /// Locks a page, returning the [`FullRowLock`].
18 | pub fn lock_page(&self, page_id: PageId) -> Arc<tokio::sync::RwLock<FullRowLock>> {
| ^^^^^^^^^
...
30 | pub fn lock_link(&self, link: Link) -> Arc<tokio::sync::RwLock<FullRowLock>> {
| ^^^^^^^^^
...
43 | pub fn is_link_locked(&self, link: &Link) -> bool {
| ^^^^^^^^^^^^^^
...
70 | pub fn is_page_locked(&self, page_id: &PageId) -> bool {
| ^^^^^^^^^^^^^^
|
|
fields `per_link_lock` and `per_page_lock` are never read:
src/table/vacuum/lock.rs#L12
error: fields `per_link_lock` and `per_page_lock` are never read
--> src/table/vacuum/lock.rs:12:5
|
11 | pub struct VacuumLock {
| ---------- fields in this struct
12 | per_link_lock: Arc<LockMap<FullRowLock, Link>>,
| ^^^^^^^^^^^^^
13 | per_page_lock: Arc<LockMap<FullRowLock, PageId>>,
| ^^^^^^^^^^^^^
|
= note: `VacuumLock` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
|
method `defragment_page` is never used:
src/table/vacuum/mod.rs#L89
error: method `defragment_page` is never used
--> src/table/vacuum/mod.rs:89:14
|
50 | / impl<
51 | | Row,
52 | | PrimaryKey,
53 | | PkNodeType,
... |
86 | | + TableSecondaryIndexCdc<Row, AvailableTypes, SecondaryEvents, AvailableIndexes>,
87 | | AvailableIndexes: Debug + AvailableIndex,
| |_____________________________________________- method in this implementation
88 | {
89 | async fn defragment_page(&self, info: PageFragmentationInfo<DATA_LENGTH>) {
| ^^^^^^^^^^^^^^^
|
|
fields `data_pages`, `vacuum_lock`, `primary_index`, and `secondary_indexes` are never read:
src/table/vacuum/mod.rs#L41
error: fields `data_pages`, `vacuum_lock`, `primary_index`, and `secondary_indexes` are never read
--> src/table/vacuum/mod.rs:41:5
|
27 | pub struct EmptyDataVacuum<
| --------------- fields in this struct
...
41 | data_pages: DataPages<Row, DATA_LENGTH>,
| ^^^^^^^^^^
42 | vacuum_lock: Arc<VacuumLock>,
| ^^^^^^^^^^^
43 |
44 | primary_index: Arc<IndexMap<PrimaryKey, Link, PkNodeType>>,
| ^^^^^^^^^^^^^
45 | secondary_indexes: Arc<SecondaryIndexes>,
| ^^^^^^^^^^^^^^^^^
|
= note: `EmptyDataVacuum` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
|
unused variable: `lock`:
src/table/vacuum/mod.rs#L90
error: unused variable: `lock`
--> src/table/vacuum/mod.rs:90:13
|
90 | let lock = self.vacuum_lock.lock_page(info.page_id);
| ^^^^ help: if this is intentional, prefix it with an underscore: `_lock`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
|
|
unused variable: `lock`:
src/table/vacuum/mod.rs#L90
error: unused variable: `lock`
--> src/table/vacuum/mod.rs:90:13
|
90 | let lock = self.vacuum_lock.lock_page(info.page_id);
| ^^^^ help: if this is intentional, prefix it with an underscore: `_lock`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
|
|
unused imports: `FullRowLock` and `LockMap`:
src/table/vacuum/mod.rs#L20
error: unused imports: `FullRowLock` and `LockMap`
--> src/table/vacuum/mod.rs:20:19
|
20 | use crate::lock::{FullRowLock, LockMap};
| ^^^^^^^^^^^ ^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
|
unused imports: `FullRowLock` and `LockMap`:
src/table/vacuum/mod.rs#L20
error: unused imports: `FullRowLock` and `LockMap`
--> src/table/vacuum/mod.rs:20:19
|
20 | use crate::lock::{FullRowLock, LockMap};
| ^^^^^^^^^^^ ^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
|
clippy_check
Clippy had exited with the 101 exit code
|
|
build
Process completed with exit code 101.
|
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|