diff options
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/change_stream_util.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/libs/change_stream_util.js b/jstests/libs/change_stream_util.js index c7176c7f112..8daa0e8be29 100644 --- a/jstests/libs/change_stream_util.js +++ b/jstests/libs/change_stream_util.js @@ -17,13 +17,22 @@ const ChangeStreamWatchMode = Object.freeze({ /** * Returns true if feature flag 'featureFlagChangeStreamsOptimization' is enabled, false otherwise. */ -function isChangeStreamOptimizationEnabled(db) { +function isChangeStreamsOptimizationEnabled(db) { const getParam = db.adminCommand({getParameter: 1, featureFlagChangeStreamsOptimization: 1}); return getParam.hasOwnProperty("featureFlagChangeStreamsOptimization") && getParam.featureFlagChangeStreamsOptimization.value; } /** + * Returns true if feature flag 'featureFlagChangeStreamsRewrite' is enabled, false otherwise. + */ +function isChangeStreamsRewriteEnabled(db) { + const getParam = db.adminCommand({getParameter: 1, featureFlagChangeStreamsRewrite: 1}); + return getParam.hasOwnProperty("featureFlagChangeStreamsRewrite") && + getParam.featureFlagChangeStreamsRewrite.value; +} + +/** * Helper function used internally by ChangeStreamTest. If no passthrough is active, it is exactly * the same as calling db.runCommand. If a passthrough is active and has defined a function * 'changeStreamPassthroughAwareRunCommand', then this method will be overridden to allow individual |