Skip to content

Commit

Permalink
[bugfix][hbase] fix deliver a null string causes dimensional table ti…
Browse files Browse the repository at this point in the history
…meout problem
  • Loading branch information
xianxing committed Dec 11, 2023
1 parent af5c3bb commit 3015a84
Showing 1 changed file with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,31 @@ public void run() {
byte[] key = serde.getRowKey(rowKey);
String keyStr = new String(key);
try {
Get get = new Get(key);
Result result = table.get(get);
if (!result.isEmpty()) {
RowData data = serde.convertToNewRow(result);
if (openCache()) {
sideCache.putCache(
keyStr,
CacheObj.buildCacheObj(
ECacheContentType.MultiLine,
Collections.singletonList(data)));
}
future.complete(Collections.singletonList(data));
} else {
dealMissKey(future);
if (openCache()) {
sideCache.putCache(keyStr, CacheMissVal.getMissKeyObj());
if (!keyStr.isEmpty()) {
Get get = new Get(key);
Result result = table.get(get);
if (!result.isEmpty()) {
RowData data = serde.convertToNewRow(result);
if (openCache()) {
sideCache.putCache(
keyStr,
CacheObj.buildCacheObj(
ECacheContentType.MultiLine,
Collections.singletonList(data)));
}
future.complete(Collections.singletonList(data));
return;
}
}
dealMissKey(future);
if (openCache()) {
sideCache.putCache(keyStr, CacheMissVal.getMissKeyObj());
}

} catch (IOException e) {
LOG.error("record:" + keyStr);
LOG.error("get side record exception:" + e);
future.complete(Collections.emptyList());
dealMissKey(future);
}
}
});
Expand Down

0 comments on commit 3015a84

Please sign in to comment.