Skip to content

Commit

Permalink
fix(NODE-6523): deleteMany in gridfs passes timeoutMS to predicate, n…
Browse files Browse the repository at this point in the history
…ot options (#4319)

Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
  • Loading branch information
baileympearson and nbbeeken authored Nov 11, 2024
1 parent db4eff5 commit 1965ed5
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 205 deletions.
3 changes: 2 additions & 1 deletion src/gridfs/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ export class GridFSBucketWriteStream extends Writable {
const remainingTimeMS = this.timeoutContext?.getRemainingTimeMSOrThrow(
`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`
);
await this.chunks.deleteMany({ files_id: this.id, timeoutMS: remainingTimeMS });

await this.chunks.deleteMany({ files_id: this.id }, { timeoutMS: remainingTimeMS });
}
}

Expand Down
Loading

0 comments on commit 1965ed5

Please sign in to comment.