New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read old records #1642
Read old records #1642
Conversation
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
Signed-off-by: Laszlo Budai <laszlo.budai@balabit.com>
8ce86eb
to
8803647
Compare
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
1 similar comment
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
(slight off topic)Hmm. I "received" similar complaint from the ubuntu, that sometimes the build is hung around the python tests (https://ubuntudiff.debian.net/q/package/syslog-ng). It may worth an issue. |
8803647
to
00daea9
Compare
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
Now, read-old-records implemented also for file-reader. |
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
Signed-off-by: Laszlo Budai <laszlo.budai@balabit.com>
dd0759f
to
956bf33
Compare
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Looks good. I have only one suggestion.
The new parameter: new_state(boolean) in (...)_apply_state might be confusing, at least in terms of variable naming.
options->read_old_records = TRUE;
Maybe a 3-state variable instead of this boolean would be better. Something like ENUM(TRUE,FALSE,OFF), when OFF would mean the original behaviour: when new_state is false. Thus we could maintain the original signature of log_proto_buffered_server_apply_state, and there is no need need of _apply_existing_state and _apply_new_state.
EDIT: Not relevant. It does not make sense to have 3state variable, because it only controls if we start at the beginning of a file or the end, and one of these should always be applied for new files.
@furiel: thanks for the review note. The key point here is that we applying an existing state or a new one: when existing one is applied then we continue to read logs from the position stored in the persist file, otherwise |
956bf33
to
eacb97c
Compare
Hmm...the affile read-old-records will be handled in a separate PR as it needs some change in functionality. |
@kira-syslogng test this please test branch=pzolee-journal-source-read-old-record; |
Build SUCCESS, the tests were executed on test branch: master and test suite: functions |
Build FAILURE, the tests were executed on test branch: pzolee-journal-source-read-old-record and test suite: functions |
@kira-syslogng test this please test branch=pzolee-journal-source-read-old-record; |
Build SUCCESS, the tests were executed on test branch: pzolee-journal-source-read-old-record and test suite: functions |
This PR supports
read_old_records
only for journal source.