diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 372e06d76..2c211f041 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -340,7 +340,6 @@ export class HttpHeaders { public static partitionKey: string = "x-ms-documentdb-partitionkey"; public static migrateOfferToManualThroughput: string = "x-ms-cosmos-migrate-offer-to-manual-throughput"; public static migrateOfferToAutopilot: string = "x-ms-cosmos-migrate-offer-to-autopilot"; - public static mongoFixedCollectionWithSharedThroughput: string = "InsertSystemPartitionKey"; } export class ApiType { diff --git a/src/Common/MongoProxyClient.test.ts b/src/Common/MongoProxyClient.test.ts index a6324c2af..f5e15d1a0 100644 --- a/src/Common/MongoProxyClient.test.ts +++ b/src/Common/MongoProxyClient.test.ts @@ -259,8 +259,7 @@ describe("MongoProxyClient", () => { sid: "a2", rg: "c1", dba: "main", - is: false, - isFixedCollectionWithSharedThroughputBeingCreated: true + is: false }; _createMongoCollectionWithARM("management.azure.com", properties, { "x-ms-cosmos-offer-autopilot-tier": "1" }); expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith( @@ -268,7 +267,7 @@ describe("MongoProxyClient", () => { "2020-04-01", { properties: { - options: { "x-ms-cosmos-offer-autopilot-tier": "1", InsertSystemPartitionKey: "true" }, + options: { "x-ms-cosmos-offer-autopilot-tier": "1" }, resource: { id: "abc-collection" } } } @@ -286,8 +285,7 @@ describe("MongoProxyClient", () => { rg: "c1", dba: "main", is: false, - offerThroughput: 400, - isFixedCollectionWithSharedThroughputBeingCreated: true + offerThroughput: 400 }; _createMongoCollectionWithARM("management.azure.com", properties, undefined); expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith( @@ -295,7 +293,7 @@ describe("MongoProxyClient", () => { "2020-04-01", { properties: { - options: { throughput: "400", InsertSystemPartitionKey: "true" }, + options: { throughput: "400" }, resource: { id: "abc-collection" } } } diff --git a/src/Common/MongoProxyClient.ts b/src/Common/MongoProxyClient.ts index e0be24adc..4e988d093 100644 --- a/src/Common/MongoProxyClient.ts +++ b/src/Common/MongoProxyClient.ts @@ -356,7 +356,6 @@ export function createMongoCollectionWithARM( armEndpoint: string, databaseId: string, analyticalStorageTtl: number, - isFixedCollectionWithSharedThroughputBeingCreated: boolean, collectionId: string, offerThroughput: number, shardKey: string, @@ -380,8 +379,7 @@ export function createMongoCollectionWithARM( sid: CosmosClient.subscriptionId(), rg: CosmosClient.resourceGroup(), dba: databaseAccount.name, - analyticalStorageTtl, - isFixedCollectionWithSharedThroughputBeingCreated + analyticalStorageTtl }; if (createDatabase) { @@ -453,11 +451,6 @@ export async function _createMongoCollectionWithARM( } } - if (params.isFixedCollectionWithSharedThroughputBeingCreated) { - rpPayloadToCreateCollection.properties.options[Constants.HttpHeaders.mongoFixedCollectionWithSharedThroughput] = - "true"; - } - if (params.analyticalStorageTtl) { rpPayloadToCreateCollection.properties.resource.analyticalStorageTtl = params.analyticalStorageTtl; } diff --git a/src/Contracts/DataModels.ts b/src/Contracts/DataModels.ts index 5042da2b9..e9190b0ae 100644 --- a/src/Contracts/DataModels.ts +++ b/src/Contracts/DataModels.ts @@ -547,7 +547,6 @@ export interface MongoParameters extends RpParameters { autoPilotTier?: string; autoPilotThroughput?: string; analyticalStorageTtl?: number; - isFixedCollectionWithSharedThroughputBeingCreated?: boolean; } export interface GraphParameters extends RpParameters { diff --git a/src/Explorer/Panes/AddCollectionPane.ts b/src/Explorer/Panes/AddCollectionPane.ts index 34b757727..6b896e741 100644 --- a/src/Explorer/Panes/AddCollectionPane.ts +++ b/src/Explorer/Panes/AddCollectionPane.ts @@ -832,7 +832,7 @@ export default class AddCollectionPane extends ContextualPaneBase implements Vie const isAadUser = EnvironmentUtility.isAadUser(); // note: v3 autopilot not supported yet for Mongo fixed collections (only tier supported) - if (!isAadUser) { + if (!isAadUser || isFixedCollectionWithSharedThroughputBeingCreated) { createCollectionFunc = () => Q( createMongoCollectionWithProxy( @@ -853,7 +853,6 @@ export default class AddCollectionPane extends ContextualPaneBase implements Vie this.container.armEndpoint(), databaseId, this._getAnalyticalStorageTtl(), - isFixedCollectionWithSharedThroughputBeingCreated, collectionId, offerThroughput, partitionKeyPath,