Skip to content

Commit

Permalink
address yuxia's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
swuferhong committed Dec 13, 2024
1 parent 4618fa7 commit b327904
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ private void handleLookupResponse(
LookupBatch lookupBatch = lookupsByBucket.get(tableBucket);
if (pbLookupRespForBucket.hasErrorCode()) {
// TODO for re-triable error, we should retry here instead of throwing exception.
ApiError error = ApiError.fromErrorMessage(pbLookupRespForBucket);
LOG.warn(
"Get error lookup response on table bucket {}, fail. Error: {}",
tableBucket,
pbLookupRespForBucket.getErrorMessage());
lookupBatch.completeExceptionally(
new FlussRuntimeException(pbLookupRespForBucket.getErrorMessage()));
error.formatErrMsg());
lookupBatch.completeExceptionally(error.exception());
} else {
List<PbValue> pbValues = pbLookupRespForBucket.getValuesList();
lookupBatch.complete(pbValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ void testLookupForNotReadyTable() throws Exception {
TableDescriptor.builder().schema(DATA1_SCHEMA_PK).distributedBy(10).build();
long tableId = createTable(tablePath, descriptor, true);
IndexedRow rowKey = keyRow(DATA1_SCHEMA_PK, new Object[] {1, "a"});
// retry until all replica ready. Otherwise, the lookup maybe fail.
// retry until all replica ready. Otherwise, the lookup maybe fail. To avoid test unstable,
// if you want to test the lookup for not ready table, you can comment the following line.
waitAllReplicasReady(tableId, descriptor);
Table table = conn.getTable(tablePath);
assertThat(lookupRow(table, rowKey)).isNull();
Expand Down

0 comments on commit b327904

Please sign in to comment.