Skip to content

Commit

Permalink
Fix linter issues (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
varunu28 authored Dec 30, 2023
1 parent a2fa454 commit d0f4950
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/concurrency/concurrency_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::db::db::{TxnLink, TxnMap};
use crate::db::request_queue::TaskQueueRequest;
use crate::execute::request::{Command, Request};
use crate::latch_manager::latch_manager::{LatchGuard, LatchManager};
use crate::lock_table::lock_table::{LockTable, LockTableGuardLink, UpdateLock};
use crate::lock_table::lock_table::{LockTable, LockTableGuardLink, UpdateLock, WaitForGuardError};
use crate::storage::mvcc::KVStore;
use crate::storage::Key;

Expand Down Expand Up @@ -53,8 +53,8 @@ impl ConcurrencyManager {
let wait_res = self.lock_table.wait_for(lock_guard).await;
if let Err(err) = wait_res {
match err {
TxnAborted => return Err(SequenceReqError::TxnAborted),
TxnCommitted => return Err(SequenceReqError::TxnCommitted),
WaitForGuardError::TxnAborted => return Err(SequenceReqError::TxnAborted),
WaitForGuardError::TxnCommitted => return Err(SequenceReqError::TxnCommitted),
}
};

Expand Down
6 changes: 3 additions & 3 deletions src/execute/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tokio::sync::mpsc::Sender;
use uuid::Uuid;

use crate::{
concurrency::concurrency_manager::{ConcurrencyManager, Guard},
concurrency::concurrency_manager::{ConcurrencyManager, Guard, SequenceReqError},
db::{
db::{TxnLink, TxnMap},
request_queue::TaskQueueRequest,
Expand Down Expand Up @@ -71,8 +71,8 @@ impl Executor {

if let Err(err) = &guard {
match err {
TxnAborted => return ExecuteResult::Err(ExecuteError::TxnAborted),
TxnCommitted => return ExecuteResult::Err(ExecuteError::TxnCommitted),
&SequenceReqError::TxnAborted => return ExecuteResult::Err(ExecuteError::TxnAborted),
&SequenceReqError::TxnCommitted => return ExecuteResult::Err(ExecuteError::TxnCommitted),
}
}

Expand Down

0 comments on commit d0f4950

Please sign in to comment.