Skip to content

Commit c77edcb

Browse files
committed
[inner-2362] disable kill and recover operations on NIOFrontRW threads
1 parent e4da171 commit c77edcb

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/main/java/com/actiontech/dble/singleton/ThreadManager.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public static void interruptSingleThread(String threadName) throws Exception {
3939
}
4040
if (find == null)
4141
throw new Exception("Thread[" + threadName + "] does not exist");
42+
43+
String[] array = threadName.split("-");
44+
if (array.length == 2 && array[1].equals(NIO_FRONT_RW)) {
45+
throw new Exception("The kill operation of thread[" + threadName + "] is not supported");
46+
}
4247
find.interrupt();
4348
LOGGER.info("exec interrupt Thread[{}]", find.getName());
4449
}
@@ -87,19 +92,7 @@ public static void recoverSingleThread(String threadName) throws Exception {
8792
}
8893
break;
8994
case NIO_FRONT_RW:
90-
if (SystemConfig.getInstance().getUsingAIO() != 1) {
91-
try {
92-
NameableExecutor nameableExecutor4 = (NameableExecutor) server.getNioFrontExecutor();
93-
if (nameableExecutor4.getPoolSize() > nameableExecutor4.getActiveCount()) {
94-
nameableExecutor4.execute(new RW(server.getFrontRegisterQueue()));
95-
} else {
96-
throw new Exception("threadPool[{" + NIO_FRONT_RW + "}] does not need to be recover");
97-
}
98-
} catch (IOException e) {
99-
throw new Exception("recover threadPool[{" + NIO_FRONT_RW + "}] fail", e);
100-
}
101-
}
102-
break;
95+
throw new Exception("The recover operation of thread[" + threadName + "] is not supported");
10396
case NIO_BACKEND_RW:
10497
if (SystemConfig.getInstance().getUsingAIO() != 1) {
10598
try {

0 commit comments

Comments
 (0)