| 1414 | |
| 1415 | |
| 1416 | static pgbson * |
| 1417 | ProcessBatchUpdateUnsharded(MongoCollection *collection, BatchUpdateSpec *batchSpec, |
| 1418 | text *transactionId, bool *hasWriteErrors) |
| 1419 | { |
| 1420 | Assert(collection->shardKey == NULL); |
| 1421 | |
| 1422 | pgbsonsequence *updateSequence = batchSpec->updateSequence; |
| 1423 | const bson_value_t *updateValue = updateSequence == NULL ? &batchSpec->updateValue : |
| 1424 | NULL; |
| 1425 | |
| 1426 | pgbson *updateSpecs = SerializeUnshardedUpdateParams(updateValue, |
| 1427 | batchSpec->isOrdered, |
| 1428 | batchSpec-> |
| 1429 | bypassDocumentValidation, |
| 1430 | &batchSpec->variableSpec); |
| 1431 | |
| 1432 | /* since this is unsharded, the keyHash is just the collection id. */ |
| 1433 | int shardKeyHash = collection->collectionId; |
| 1434 | Datum workerResult = CallUpdateWorker(collection, updateSpecs, updateSequence, |
| 1435 | shardKeyHash, transactionId); |
| 1436 | |
| 1437 | pgbson *response = DatumGetPgBson(workerResult); |
| 1438 | return DeserializeBatchUpdateWorkerResponse(response, hasWriteErrors); |
| 1439 | } |
| 1440 | |
| 1441 | |
| 1442 | static void |
no test coverage detected