Conversation
| if algodImp.cancel != nil { | ||
| algodImp.cancel() | ||
| } | ||
| algodImp.logger.Infof("importer algod.Close() at round %d", algodImp.round) |
There was a problem hiding this comment.
I don't think we need to save the round in importer. we can print the round in the exporter.
There was a problem hiding this comment.
I wanted to introduce the round purely for logging purposes -to know from algod importer's perspective- which round it was on. But this could be overkill. I see several approaches:
- keep as is
- revert and get rid of the round
- rename
algodImp.round→algodImpl.loggingRoundto clarify that it's not actually useful for anything except for logging
I don't have a strong opinion here.
| } | ||
| } | ||
| }() | ||
|
|
There was a problem hiding this comment.
these are the other signals we support in indexer.
https://github.com/algorand/indexer/blob/cb2f42818f829df3f1f996ca64e3c0a7fd23a255/cmd/validator/core/command.go#L181
There was a problem hiding this comment.
But this most recent commit fails tests. First hunch is that this is a real failure.
...nahh. Just a careless copy 🍝 .
|
Thanks @shiqizng for approving. I'm going to close this PR and re-open it against |
Summary
Gracefully handling interrupt signal. The non-gracefulness was discovered during block-generator testing. The following new printouts are being generated (which without the new go-routine are NOT printed).
{"__type":"Conduit","_name":"main","level":"info","msg":"Pipeline received interrupt signal, stopping pipeline. p.pipelineMetadata.NextRound: 14","time":"2023-06-09T14:47:06-05:00"} {"__type":"importer","_name":"algod","level":"trace","msg":"importer algod.GetBlock() called BlockRaw(14) err: context canceled","time":"2023-06-09T14:47:06-05:00"} {"__type":"importer","_name":"algod","level":"error","msg":"error getting block for round 14 (attempt 0): context canceled","time":"2023-06-09T14:47:06-05:00"} {"__type":"importer","_name":"algod","level":"trace","msg":"importer algod.GetBlock() called StatusAfterBlock(13) err: context canceled","time":"2023-06-09T14:47:06-05:00"} {"__type":"Conduit","_name":"main","level":"error","msg":"GetBlock ctx error: context canceled","time":"2023-06-09T14:47:06-05:00"} {"__type":"Conduit","_name":"main","level":"info","msg":"Retry number 1 resuming after a 1s retry delay.","time":"2023-06-09T14:47:06-05:00"} {"__type":"importer","_name":"algod","level":"info","msg":"importer algod.Close() at round 14","time":"2023-06-09T14:47:07-05:00"} {"__type":"Conduit","_name":"main","level":"info","msg":"Pipeline.Stop(): Importer (algod) closed without error","time":"2023-06-09T14:47:07-05:00"} {"__type":"importer","_name":"algod","level":"info","msg":"importer algod.Close() at round 14","time":"2023-06-09T14:47:07-05:00"} {"__type":"Conduit","_name":"main","level":"info","msg":"Pipeline.Stop(): Importer (algod) closed without error","time":"2023-06-09T14:47:07-05:00"} {"__type":"exporter","_name":"postgresql","level":"info","msg":"exporter postgresql.Close() at round 14","time":"2023-06-09T14:47:07-05:00"} {"__type":"Conduit","_name":"main","level":"info","msg":"Pipeline.Stop(): Exporter (postgresql) closed without error","time":"2023-06-09T14:47:07-05:00"} {"__type":"exporter","_name":"postgresql","level":"info","msg":"exporter postgresql.Close() at round 14","time":"2023-06-09T14:47:07-05:00"}I'm not sure why the
closed without errorlines are getting repeated for each plugin.Test Plan
WOMM