zstan commented on code in PR #2101:
URL: https://github.com/apache/ignite-3/pull/2101#discussion_r1205905300
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/IgniteTableImpl.java:
##########
@@ -531,16 +536,17 @@ private ColocationGroup partitionedGroup() {
}
private class StatisticsImpl implements Statistic {
- private static final int STATS_CLI_UPDATE_THRESHOLD = 200;
+ private static final int STATS_UPDATE_THRESHOLD =
DistributionZoneManager.DEFAULT_PARTITION_COUNT;
- AtomicInteger statReqCnt = new AtomicInteger();
+ private final AtomicLong lastUpd = new AtomicLong();
- private volatile long localRowCnt;
+ private volatile long localRowCnt = 0L;
/** {@inheritDoc} */
@Override
+ // TODO: need to be refactored
https://issues.apache.org/jira/browse/IGNITE-19558
public Double getRowCount() {
- if (statReqCnt.getAndIncrement() % STATS_CLI_UPDATE_THRESHOLD ==
0) {
+ if (updateStat.get()) {
Review Comment:
this will work NOT WORSE than before ) correct fix mention in TODO a little
bit upper
https://issues.apache.org/jira/browse/IGNITE-19558
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]