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 c6f4050 commit a5707ecCopy full SHA for a5707ec
src/helpers/constants.ts
@@ -0,0 +1,14 @@
1
+/**
2
+ * A cap for the maxTimeMS used for FindCursor.countDocuments.
3
+ *
4
+ * The number is relatively smaller because we expect the count documents query
5
+ * to be finished sooner if not by the time the batch of documents is retrieved
6
+ * so that count documents query don't hold the final response back.
7
+ */
8
+export const QUERY_COUNT_MAX_TIME_MS_CAP: number = 10_000;
9
+
10
11
+ * A cap for the maxTimeMS used for counting resulting documents of an
12
+ * aggregation.
13
14
+export const AGG_COUNT_MAX_TIME_MS_CAP: number = 60_000;
0 commit comments