SERVER-124295: Make aggregation tests work with replicated fast count (#52006)
GitOrigin-RevId: 7f96e48ea60915afb320dc79a6bb2f77ec062e0e
This commit is contained in:
parent
a7c99c3df6
commit
8a1081df6c
@ -17,7 +17,8 @@ for (let i = 0; i < memoryLimitMB + 10; i++) {
|
||||
}
|
||||
assert.commandWorked(bulk.execute());
|
||||
|
||||
assert.gt(coll.stats().size, memoryLimitMB * 1024 * 1024);
|
||||
const dataSize = assert.commandWorked(db.runCommand({dataSize: coll.getFullName()})).size;
|
||||
assert.gt(dataSize, memoryLimitMB * 1024 * 1024);
|
||||
|
||||
// Test accumulating all values into one array. On debug builds we will spill to disk for $group and
|
||||
// so may hit the group error code before we hit ExceededMemoryLimit.
|
||||
|
||||
@ -18,7 +18,8 @@ for (let i = 0; i < memoryLimitMB + 10; i++) {
|
||||
}
|
||||
assert.commandWorked(bulk.execute());
|
||||
|
||||
assert.gt(coll.stats().size, memoryLimitMB * 1024 * 1024);
|
||||
const dataSize = assert.commandWorked(db.runCommand({dataSize: coll.getFullName()})).size;
|
||||
assert.gt(dataSize, memoryLimitMB * 1024 * 1024);
|
||||
|
||||
// Test accumulating all values into one array. On debug builds we will spill to disk for $group and
|
||||
// so may hit the group error code before we hit ExceededMemoryLimit.
|
||||
|
||||
@ -62,7 +62,8 @@ const bigStr = Array(1024 * 1024 + 1).toString(); // 1MB of ','
|
||||
for (let i = 0; i < memoryLimitMB + 1; i++)
|
||||
assert.commandWorked(coll.insert({_id: i, bigStr: i + bigStr, random: Math.random()}));
|
||||
|
||||
assert.gt(coll.stats().size, memoryLimitMB * 1024 * 1024);
|
||||
const dataSize = assert.commandWorked(db.runCommand({dataSize: coll.getFullName()})).size;
|
||||
assert.gt(dataSize, memoryLimitMB * 1024 * 1024);
|
||||
|
||||
function test({pipeline, expectedCodes, canSpillToDisk}) {
|
||||
// Test that 'allowDiskUse: false' does indeed prevent spilling to disk.
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
// Test that count within a $collStats stage returns the correct number of documents.
|
||||
// @tags: [assumes_no_implicit_collection_creation_after_drop]
|
||||
/** Test that count within a $collStats stage returns the correct number of documents.
|
||||
* @tags: [
|
||||
* assumes_no_implicit_collection_creation_after_drop,
|
||||
* # TODO SERVER-124178: Revisit this test.
|
||||
* featureFlagReplicatedFastCount_incompatible,
|
||||
* ]
|
||||
*/
|
||||
import {assertErrorCode} from "jstests/aggregation/extras/utils.js";
|
||||
|
||||
let testDB = db.getSiblingDB("aggregation_count_db");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user