Partitions timeout is not handled correctly

Description

In AbstractSenseiCoreService.java

for (int i = 0; i < futures.length; ++i) {
try {
Res res = futures[i].get(_timeout, TimeUnit.MILLISECONDS);
resultList.add(res);
} catch (Exception e) {
if (e instanceof TimeoutException) {
logger.error("Getting partition " + partitionArray[i] + " result is timeout.");
senseiReq.addError(new SenseiError(e.getMessage(), ErrorType.ExecutionTimeout));
} else {
logger.error(e.getMessage(), e);
senseiReq.addError(new SenseiError(e.getMessage(), ErrorType.BoboExecutionError));
}
Res res = getEmptyResultInstance(e);
res.setTime(-1);
resultList.add(res);
}
}

Although partition searching is parallel, but waiting the resullts is not.

This means the whole timeout maybe _timeout*partitionNumber.

Environment

None

Status

Assignee

Yonghui Zhao

Reporter

Yonghui Zhao

Labels

None

Priority

Major
Configure