This is an automated email from the ASF dual-hosted git repository.
amatya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 11dbfb6e3fd Better error message when partition space is exhausted
(#15685)
11dbfb6e3fd is described below
commit 11dbfb6e3fd9fe330c3904b389cc7f9e15b21bec
Author: AmatyaAvadhanula <[email protected]>
AuthorDate: Tue Jan 16 12:32:40 2024 +0530
Better error message when partition space is exhausted (#15685)
* Better error message when partition space is exhausted
---
.../druid/timeline/partition/OvershadowableManager.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git
a/processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java
b/processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java
index 8d010cf43b6..dbcf5658f01 100644
---
a/processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java
+++
b/processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java
@@ -403,9 +403,9 @@ class OvershadowableManager<T extends Overshadowable<T>>
TreeMap<RootPartitionRange, Short2ObjectSortedMap<AtomicUpdateGroup<T>>>
stateMap
)
{
- final RootPartitionRange lowFench = new RootPartitionRange((short) 0,
(short) 0);
+ final RootPartitionRange lowFence = new RootPartitionRange((short) 0,
(short) 0);
final RootPartitionRange highFence = new RootPartitionRange(partitionId,
partitionId);
- return stateMap.subMap(lowFench, false, highFence,
false).descendingMap().entrySet().iterator();
+ return stateMap.subMap(lowFence, false, highFence,
false).descendingMap().entrySet().iterator();
}
/**
@@ -418,9 +418,14 @@ class OvershadowableManager<T extends Overshadowable<T>>
TreeMap<RootPartitionRange, Short2ObjectSortedMap<AtomicUpdateGroup<T>>>
stateMap
)
{
- final RootPartitionRange lowFench = new RootPartitionRange(partitionId,
partitionId);
+ final RootPartitionRange lowFence = new RootPartitionRange(partitionId,
partitionId);
final RootPartitionRange highFence = new
RootPartitionRange(Short.MAX_VALUE, Short.MAX_VALUE);
- return stateMap.subMap(lowFench, false, highFence,
false).entrySet().iterator();
+ if (lowFence.compareTo(highFence) > 0) {
+ throw new ISE("PartitionId[%d] must be in the range [0, 32767]. "
+ + "Try compacting the interval to reduce the segment
count.", Short.toUnsignedInt(partitionId));
+ } else {
+ return stateMap.subMap(lowFence, false, highFence,
false).entrySet().iterator();
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]