Skip to content

Commit a923fce

Browse files
committed
Improve graph build progress logging (fallback + 2s throttle)
1 parent 60381d6 commit a923fce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

engine/src/main/java/com/arcadedb/index/vector/LSMVectorIndex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ private void buildGraphFromScratch(final GraphBuildCallback graphCallback) {
784784
* @param graphCallback Optional callback for graph build progress
785785
*/
786786
private void buildGraphFromScratchWithRetry(final GraphBuildCallback graphCallback) {
787-
// Always have a progress reporter: if caller didn't provide one, log throttled progress every ~5s
787+
// Always have a progress reporter: if caller didn't provide one, log throttled progress every ~2s
788788
final GraphBuildCallback effectiveGraphCallback;
789789
if (graphCallback != null) {
790790
effectiveGraphCallback = graphCallback;
@@ -797,7 +797,7 @@ private void buildGraphFromScratchWithRetry(final GraphBuildCallback graphCallba
797797

798798
final long now = System.currentTimeMillis();
799799
final boolean progressed = processedNodes != lastLoggedProcessed[0];
800-
final boolean timeElapsed = now - lastLogTimeMs[0] >= 5000;
800+
final boolean timeElapsed = now - lastLogTimeMs[0] >= 2000;
801801
final boolean reachedEnd = processedNodes >= totalNodes && lastLoggedProcessed[0] != totalNodes;
802802
final boolean shouldLog = progressed && (timeElapsed || reachedEnd);
803803

0 commit comments

Comments
 (0)