Commit 1d65435b authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5351 clang compilation cleanup after 5351 merge

git-svn-id: file:///svn/toku/tokudb@49862 c7de825b-a66e-492c-adef-691d508d4ae1
parent e6182bb7
...@@ -26,7 +26,7 @@ void lock_request::create(uint64_t wait_time) { ...@@ -26,7 +26,7 @@ void lock_request::create(uint64_t wait_time) {
m_state = state::UNINITIALIZED; m_state = state::UNINITIALIZED;
m_wait_time = wait_time; m_wait_time = wait_time;
m_wait_cond = TOKU_COND_INITIALIZER; toku_cond_init(&m_wait_cond, nullptr);
} }
// destroy a lock request. // destroy a lock request.
...@@ -152,7 +152,8 @@ void lock_request::calculate_cond_wakeup_time(struct timespec *ts) { ...@@ -152,7 +152,8 @@ void lock_request::calculate_cond_wakeup_time(struct timespec *ts) {
int64_t usec = now.tv_usec + ((m_wait_time % 1000) * 1000); int64_t usec = now.tv_usec + ((m_wait_time % 1000) * 1000);
int64_t d_sec = usec / 1000000; int64_t d_sec = usec / 1000000;
int64_t d_usec = usec % 1000000; int64_t d_usec = usec % 1000000;
*ts = { sec + d_sec, d_usec * 1000 }; ts->tv_sec = sec + d_sec;
ts->tv_nsec = d_usec * 1000;
} }
// sleep on the lock request until it becomes resolved or the wait time has elapsed. // sleep on the lock request until it becomes resolved or the wait time has elapsed.
......
...@@ -192,7 +192,8 @@ int locktree::acquire_lock(bool is_write_request, TXNID txnid, ...@@ -192,7 +192,8 @@ int locktree::acquire_lock(bool is_write_request, TXNID txnid,
remove_row_lock(&lkr, lock, m_mem_tracker); remove_row_lock(&lkr, lock, m_mem_tracker);
} }
lock = { .range = requested_range, .txnid = txnid }; lock.range = requested_range;
lock.txnid = txnid;
insert_row_lock(&lkr, lock, m_mem_tracker); insert_row_lock(&lkr, lock, m_mem_tracker);
} }
......
...@@ -40,9 +40,9 @@ static uint64_t check_for_range_and_count(concurrent_tree::locked_keyrange *lkr, ...@@ -40,9 +40,9 @@ static uint64_t check_for_range_and_count(concurrent_tree::locked_keyrange *lkr,
keyrange target_range; keyrange target_range;
bool target_range_found; bool target_range_found;
bool fn(const keyrange &range, TXNID txnid) { bool fn(const keyrange &query_range, TXNID txnid) {
(void) txnid; (void) txnid;
if (range.compare(cmp, target_range) == keyrange::comparison::EQUALS) { if (query_range.compare(cmp, target_range) == keyrange::comparison::EQUALS) {
invariant(!target_range_found); invariant(!target_range_found);
target_range_found = true; target_range_found = true;
} }
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
namespace toku { namespace toku {
static int find_by_txnid(const TXNID &txnid_a, const TXNID &txnid_b) { int find_by_txnid(const TXNID &txnid_a, const TXNID &txnid_b);
int find_by_txnid(const TXNID &txnid_a, const TXNID &txnid_b) {
if (txnid_a < txnid_b) { if (txnid_a < txnid_b) {
return -1; return -1;
} else if (txnid_a == txnid_b) { } else if (txnid_a == txnid_b) {
......
...@@ -26,7 +26,9 @@ static DB_TXN *txn_oldest_ancester(DB_TXN* txn) { ...@@ -26,7 +26,9 @@ static DB_TXN *txn_oldest_ancester(DB_TXN* txn) {
return txn; return txn;
} }
static int find_key_ranges_by_lt(const txn_lt_key_ranges &ranges, int find_key_ranges_by_lt(const txn_lt_key_ranges &ranges,
toku::locktree *const &find_lt);
int find_key_ranges_by_lt(const txn_lt_key_ranges &ranges,
toku::locktree *const &find_lt) { toku::locktree *const &find_lt) {
return ranges.lt->compare(find_lt); return ranges.lt->compare(find_lt);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment