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 54e2507
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/aerospike/aerospike_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ 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;
uint8_t info_attr = (qb->is_new || query->where.size == 0)? 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,
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 54e2507

Please sign in to comment.