Skip to content

Commit 85b7ac2

Browse files
committed
Change Error Code from 301 to 719 in case of sort memory not enough
(cherry picked from commit 32add57)
1 parent f47f8a8 commit 85b7ac2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/sort/SortBufferManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
package org.apache.iotdb.db.utils.sort;
2121

22+
import org.apache.iotdb.db.queryengine.exception.MemoryNotEnoughException;
23+
2224
public class SortBufferManager {
2325

2426
private final int maxTsBlockSizeInBytes;
@@ -44,7 +46,7 @@ public SortBufferManager(int maxTsBlockSizeInBytes, long sortBufferSize) {
4446
public void allocateOneSortBranch() {
4547
boolean success = allocate(bufferSizeForOneBranch);
4648
if (!success) {
47-
throw new IllegalArgumentException("Not enough memory for sorting");
49+
throw new MemoryNotEnoughException("Not enough memory for sorting");
4850
}
4951
branchNum++;
5052
}

0 commit comments

Comments
 (0)