Skip to content

Commit 382a92f

Browse files
committed
store: Better error when a copy batch times out
1 parent 68c3804 commit 382a92f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

store/postgres/src/copy.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,19 @@ impl CopyTableWorker {
748748
break status;
749749
}
750750
Err(StoreError::StatementTimeout) => {
751+
let timeout = ENV_VARS
752+
.store
753+
.batch_timeout
754+
.map(|t| t.as_secs().to_string())
755+
.unwrap_or_else(|| "unlimted".to_string());
751756
warn!(
752-
logger,
753-
"Current batch took longer than GRAPH_STORE_BATCH_TIMEOUT seconds. Retrying with a smaller batch size."
754-
);
757+
logger,
758+
"Current batch timed out. Retrying with a smaller batch size.";
759+
"timeout_s" => timeout,
760+
"table" => self.table.dst.qualified_name.as_str(),
761+
"current_vid" => self.table.batcher.next_vid(),
762+
"current_batch_size" => self.table.batcher.batch_size(),
763+
);
755764
}
756765
Err(e) => {
757766
return Err(e);

0 commit comments

Comments
 (0)