SOLR-12729: Unlock the shard on error.

This commit is contained in:
Andrzej Bialecki 2018-10-22 11:27:35 +02:00
parent 5de6332209
commit 8c70811f3a
1 changed files with 1 additions and 0 deletions

View File

@ -1156,6 +1156,7 @@ public class SimClusterStateProvider implements ClusterStateProvider {
Map<String, Object> props = sliceProperties.computeIfAbsent(collectionName, c -> new ConcurrentHashMap<>()) Map<String, Object> props = sliceProperties.computeIfAbsent(collectionName, c -> new ConcurrentHashMap<>())
.computeIfAbsent(sliceName.get(), ss -> new ConcurrentHashMap<>()); .computeIfAbsent(sliceName.get(), ss -> new ConcurrentHashMap<>());
if (props.containsKey(BUFFERED_UPDATES)) { if (props.containsKey(BUFFERED_UPDATES)) {
SplitShardCmd.unlockForSplit(cloudManager, collectionName, sliceName.get());
throw new Exception("--- SOLR-12729: Overlapping splitShard commands for " + collectionName + "/" + sliceName.get()); throw new Exception("--- SOLR-12729: Overlapping splitShard commands for " + collectionName + "/" + sliceName.get());
} }
props.put(BUFFERED_UPDATES, new AtomicLong()); props.put(BUFFERED_UPDATES, new AtomicLong());