We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5160778 commit 225af87Copy full SHA for 225af87
modules/module-mongodb/src/replication/ChangeStream.ts
@@ -234,8 +234,10 @@ export class ChangeStream {
234
changeStreamPreAndPostImages: { enabled: true }
235
});
236
} else if (this.usePostImages && collection.options?.changeStreamPreAndPostImages?.enabled != true) {
237
- await this.defaultDb.command({
238
- collMod: CHECKPOINTS_COLLECTION,
+ // Drop + create requires less permissions than collMod,
+ // and we don't care about the data in this collection.
239
+ await this.defaultDb.dropCollection(CHECKPOINTS_COLLECTION);
240
+ await this.defaultDb.createCollection(CHECKPOINTS_COLLECTION, {
241
242
243
}
0 commit comments