Skip to content

Commit

Permalink
[FIX] Performance issues when using new Oplog implementation (#19181)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Sampaio <chinello@gmail.com>
  • Loading branch information
rodrigok and sampaiodiego committed Oct 9, 2020
1 parent 3790480 commit ce1f4a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/server/models/_oplogHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class OplogHandle {

this.stream = oplogCollection.find(oplogSelector, {
tailable: true,
// awaitData: true,
awaitData: true,
}).stream();

// Prevent warning about many listeners, we add 11
Expand Down
8 changes: 8 additions & 0 deletions mongodb.aug.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'mongodb';

declare module 'mongodb' {
// eslint-disable-next-line @typescript-eslint/interface-name-prefix
export interface FindOneOptions<T> {
awaitData?: boolean;
}
}

0 comments on commit ce1f4a1

Please sign in to comment.