Skip to content

Commit

Permalink
[fix](cloud) getVersionUpdateTimeMs out of bound (#38074)
Browse files Browse the repository at this point in the history
Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
  • Loading branch information
freemandealer authored and dataroaring committed Jul 19, 2024
1 parent feacd22 commit 448611f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public long getVisibleVersion() {
if (resp.getStatus().getCode() == MetaServiceCode.OK) {
version = resp.getVersion();
// Cache visible version, see hasData() for details.
assert resp.getVersionUpdateTimeMsList().size() == 1;
setCachedVisibleVersion(version, resp.getVersionUpdateTimeMs(0));
long mTime = resp.getVersionUpdateTimeMsList().size() == 1 ? resp.getVersionUpdateTimeMs(0) : 0;
setCachedVisibleVersion(version, mTime);
} else {
assert resp.getStatus().getCode() == MetaServiceCode.VERSION_NOT_FOUND;
version = Partition.PARTITION_INIT_VERSION;
Expand Down

0 comments on commit 448611f

Please sign in to comment.