mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Tweaking writer API for failed rotations.
There are now two FinishedRotation() methods, one that triggers post-processing and one that doesn't. There's also insurance built in against a writer not calling either (or both), in which case we abort with an internal error.
This commit is contained in:
parent
4359bf6b42
commit
4ba038070f
12 changed files with 65 additions and 74 deletions
|
@ -248,9 +248,8 @@ void WriterFrontend::Rotate(const char* rotated_path, double open, double close,
|
|||
if ( backend )
|
||||
backend->SendIn(new RotateMessage(backend, this, rotated_path, open, close, terminating));
|
||||
else
|
||||
// Still signal log manager that we're done, but signal that
|
||||
// nothing happened by setting the writer to zeri.
|
||||
log_mgr->FinishedRotation(0, "", rotated_path, open, close, terminating);
|
||||
// Still signal log manager that we're done.
|
||||
log_mgr->FinishedRotation(this, 0, 0, 0, 0, false, terminating);
|
||||
}
|
||||
|
||||
void WriterFrontend::DeleteVals(Value** vals)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue