Skip to content

Commit

Permalink
Do not increment node error count on record not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianNichols committed Feb 26, 2024
1 parent 37a374a commit 3f14ae6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/aerospike/as_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,11 @@ as_command_execute(as_command* cmd, as_error* err)
as_error_set_in_doubt(err, cmd->flags & AS_COMMAND_FLAGS_READ, cmd->sent);
return status;

case AEROSPIKE_ERR_RECORD_NOT_FOUND:
// Do not increment error count on record not found.
as_error_set_in_doubt(err, cmd->flags & AS_COMMAND_FLAGS_READ, cmd->sent);
break;

default:
as_node_add_error(node);
as_error_set_in_doubt(err, cmd->flags & AS_COMMAND_FLAGS_READ, cmd->sent);
Expand Down
5 changes: 5 additions & 0 deletions src/main/aerospike/as_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,11 @@ as_event_response_error(as_event_command* cmd, as_error* err)
as_event_put_connection(cmd, pool);
break;

case AEROSPIKE_ERR_RECORD_NOT_FOUND:
// Do not increment error count on record not found.
as_event_put_connection(cmd, pool);
break;

default:
as_node_add_error(cmd->node);
as_event_put_connection(cmd, pool);
Expand Down

0 comments on commit 3f14ae6

Please sign in to comment.