Fall back to previously calculated totalScan
This commit is contained in:
parent
4a59562cb7
commit
5ca6800085
1 changed files with 3 additions and 5 deletions
|
|
@ -622,11 +622,9 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
||||||
if (isTotalSegmentsCacheValid()) {
|
if (isTotalSegmentsCacheValid()) {
|
||||||
return cachedTotalSegments;
|
return cachedTotalSegments;
|
||||||
}
|
}
|
||||||
int parallelScanTotalSegments = DEFAULT_LEASE_TABLE_SCAN_PARALLELISM_FACTOR;
|
|
||||||
if (isTotalSegmentsCacheValid()) {
|
int parallelScanTotalSegments = cachedTotalSegments == null ? DEFAULT_LEASE_TABLE_SCAN_PARALLELISM_FACTOR : cachedTotalSegments;
|
||||||
return cachedTotalSegments;
|
final DescribeTableResponse describeTableResponse = describeLeaseTable();
|
||||||
}
|
|
||||||
DescribeTableResponse describeTableResponse = describeLeaseTable();
|
|
||||||
if (describeTableResponse == null) {
|
if (describeTableResponse == null) {
|
||||||
log.info("DescribeTable returned null so using default totalSegments : {}", parallelScanTotalSegments);
|
log.info("DescribeTable returned null so using default totalSegments : {}", parallelScanTotalSegments);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue