Skip to content

Commit a5707ec

Browse files
chore: add missing constants files
1 parent c6f4050 commit a5707ec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/helpers/constants.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)