Skip to content

Commit ad9c6bc

Browse files
committed
fix: work around libmongocrypt createIndex bug
1 parent ccd8f6d commit ad9c6bc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/cli-repl/src/cli-repl.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,13 @@ class CliRepl implements MongoshIOProvider {
233233

234234
if (driverOptions.autoEncryption) {
235235
const origExtraOptions = driverOptions.autoEncryption.extraOptions ?? {};
236-
if (origExtraOptions.csflePath) {
236+
// @ts-expect-error next driver release updates library name
237+
if (origExtraOptions.cryptSharedLibPath) {
237238
// If a CSFLE path has been specified through 'driverOptions', save it
238239
// for later use.
239240
this.cachedCryptLibraryPath = Promise.resolve({
240-
csflePath: origExtraOptions.csflePath
241+
// @ts-expect-error next driver release updates library name
242+
cryptSharedLibPath: origExtraOptions.cryptSharedLibPath
241243
});
242244
}
243245

packages/shell-api/src/field-level-encryption.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ export class KeyVault extends ShellApiWithMongoClass {
160160
}
161161

162162
async _init(): Promise<void> {
163+
if (this._mongo._fleOptions?.bypassQueryAnalysis) {
164+
return; // TODO: Re-enable after libmongocrypt createIndex bug is fixed
165+
}
163166
try {
164167
const existingIndexKeys = await this._keyColl.getIndexKeys();
165168
if (existingIndexKeys.some(key => key.keyAltNames)) {

0 commit comments

Comments
 (0)