Skip to content

Commit 25f99ee

Browse files
authored
CDRIVER-4629 Remove OP_QUERY codepath in mongoc_cluster_run_command_monitored (#1251)
1 parent 46e65b5 commit 25f99ee

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/libmongoc/src/mongoc/mongoc-cluster.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ mongoc_cluster_run_command_monitored (mongoc_cluster_t *cluster,
503503
const mongoc_server_stream_t *server_stream;
504504
bson_t reply_local;
505505
bson_error_t error_local;
506-
int32_t compressor_id;
507506
bson_iter_t iter;
508507
bson_t encrypted = BSON_INITIALIZER;
509508
bson_t decrypted = BSON_INITIALIZER;
@@ -512,7 +511,6 @@ mongoc_cluster_run_command_monitored (mongoc_cluster_t *cluster,
512511

513512
server_stream = cmd->server_stream;
514513
server_id = server_stream->sd->id;
515-
compressor_id = mongoc_server_description_compressor_id (server_stream->sd);
516514

517515
callbacks = &cluster->client->apm_callbacks;
518516
if (!reply) {
@@ -545,13 +543,7 @@ mongoc_cluster_run_command_monitored (mongoc_cluster_t *cluster,
545543
mongoc_apm_command_started_cleanup (&started_event);
546544
}
547545

548-
if (mongoc_cluster_uses_server_api (cluster) ||
549-
server_stream->sd->max_wire_version >= WIRE_VERSION_MIN) {
550-
retval = mongoc_cluster_run_opmsg (cluster, cmd, reply, error);
551-
} else {
552-
retval = mongoc_cluster_run_command_opquery (
553-
cluster, cmd, compressor_id, reply, error);
554-
}
546+
retval = mongoc_cluster_run_opmsg (cluster, cmd, reply, error);
555547

556548
if (retval && callbacks->succeeded) {
557549
bson_t fake_reply = BSON_INITIALIZER;

0 commit comments

Comments
 (0)