Skip to content

Commit b8815d2

Browse files
committed
fix
1 parent afc8693 commit b8815d2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/compass-global-writes/src/services/atlas-global-writes-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class AtlasGlobalWritesService {
186186
const namespaceShardingError = data.automationStatus.processes.find(
187187
(process) =>
188188
process.statusType === 'ERROR' &&
189-
process.workingOnShort === 'ShardingCollections' &&
189+
process.workingOnShort === 'ShardCollections' &&
190190
process.errorText.indexOf(namespace) !== -1
191191
);
192192
if (!namespaceShardingError) return undefined;

packages/compass-global-writes/src/store/reducer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ export const fetchNamespaceShardKey = (): GlobalWritesThunkAction<
732732
atlasGlobalWritesService.getShardingKeys(namespace),
733733
]);
734734

735-
if (shardingError) {
735+
if (shardingError && !shardKey) {
736+
// if there is an existing shard key and an error both,
737+
// means we have a key mismatch
738+
// this will be handled in NamespaceShardKeyFetched
736739
if (status === ShardingStatuses.SHARDING) {
737740
dispatch(stopPollingForShardKey());
738741
}

0 commit comments

Comments
 (0)