Commit d8204bcf authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3352] Closes #3352 Replace thread-safe increment with less expensive ++...

[t:3352] Closes #3352 Replace thread-safe increment with less expensive ++ operator for update_status counters.


git-svn-id: file:///svn/toku/tokudb@29206 c7de825b-a66e-492c-adef-691d508d4ae1
parent f86871a5
...@@ -1463,7 +1463,7 @@ static int do_update(BRT t, BRTNODE node, BRT_MSG cmd, int idx, ...@@ -1463,7 +1463,7 @@ static int do_update(BRT t, BRTNODE node, BRT_MSG cmd, int idx,
if (cmd->type == BRT_UPDATE) { if (cmd->type == BRT_UPDATE) {
// key is passed in with command (should be same as from le) // key is passed in with command (should be same as from le)
// update function extra is passed in with command // update function extra is passed in with command
(void) toku_sync_fetch_and_increment_uint64(&update_status.updates); update_status.updates++;
keyp = cmd->u.id.key; keyp = cmd->u.id.key;
update_function_extra = cmd->u.id.val; update_function_extra = cmd->u.id.val;
} else if (cmd->type == BRT_UPDATE_BROADCAST_ALL) { } else if (cmd->type == BRT_UPDATE_BROADCAST_ALL) {
...@@ -1472,7 +1472,7 @@ static int do_update(BRT t, BRTNODE node, BRT_MSG cmd, int idx, ...@@ -1472,7 +1472,7 @@ static int do_update(BRT t, BRTNODE node, BRT_MSG cmd, int idx,
assert(le); // for broadcast updates, we just hit all leafentries assert(le); // for broadcast updates, we just hit all leafentries
// so this cannot be null // so this cannot be null
assert(cmd->u.id.key->size == 0); assert(cmd->u.id.key->size == 0);
(void) toku_sync_fetch_and_increment_uint64(&update_status.updates_broadcast); update_status.updates_broadcast++;
keyp = toku_fill_dbt(&key, le_key(le), le_keylen(le)); keyp = toku_fill_dbt(&key, le_key(le), le_keylen(le));
update_function_extra = cmd->u.id.val; update_function_extra = cmd->u.id.val;
} else { } else {
......
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