Skip to content

Commit

Permalink
CLIENT-2972 Allow scan to work in a mixed cluster of server 5.7 and 6…
Browse files Browse the repository at this point in the history
….4 nodes.
  • Loading branch information
BrianNichols committed May 29, 2024
1 parent 5fe3f99 commit 95b29bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/main/aerospike/aerospike_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,9 @@ as_query_command_init(
write_attr |= AS_MSG_INFO2_RELAX_AP_LONG_QUERY;
}

uint8_t info_attr = qb->is_new ? AS_MSG_INFO3_PARTITION_DONE : 0;

p = as_command_write_header_read(cmd, base_policy, AS_POLICY_READ_MODE_AP_ONE,
AS_POLICY_READ_MODE_SC_SESSION, -1, base_policy->total_timeout, qb->n_fields, qb->n_ops,
read_attr, write_attr, info_attr);
read_attr, write_attr, AS_MSG_INFO3_PARTITION_DONE);
}
else if (query->ops) {
// Background query with operations.
Expand Down
5 changes: 1 addition & 4 deletions src/main/aerospike/aerospike_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,9 @@ as_scan_command_init(
read_attr |= AS_MSG_INFO1_GET_NOBINDATA;
}

// Clusters that support partition queries also support not sending partition done messages.
int info_attr = cluster->has_partition_query? AS_MSG_INFO3_PARTITION_DONE : 0;

p = as_command_write_header_read(cmd, &policy->base, AS_POLICY_READ_MODE_AP_ONE,
AS_POLICY_READ_MODE_SC_SESSION, -1, policy->base.total_timeout, sb->n_fields, n_ops,
read_attr, 0, info_attr);
read_attr, 0, AS_MSG_INFO3_PARTITION_DONE);
}

if (scan->ns[0]) {
Expand Down

0 comments on commit 95b29bb

Please sign in to comment.