feat: limit max. number of returned audit events/messages in API
Description
feat: limit max. number of returned audit events/messages in API
- Limit maximum number of events/messages returned to auditer consumers when they ask for new messages. Default is 10 000. They can get newer messages by repeating the API call.
BREAKING CHANGE: Methods returning new audit messages/events for auditer
consumers now limit maximum number of returned messages in one call
to 10000. Limit is configurable and can be set by
perun.auditlogReadLimit
property in perun.properties
.
How to test
Set counters for last processed messages backwards and see if components like dispatcher, notifications, auditlogger, ldapc still work. They should always process bulk of max. 10 000 messages. They shouldn't run out of available memory to process them.
Author's checklist
-
I have followed the contribution guidelines -
This MR has been tested or does not change functionality -
I have added relevant merge request dependencies (if this MR has any) -
I have added the correct labels -
I have assigned reviewers (if any are relevant) -
I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation -
I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)
Reviewer's checklist
-
This MR has been tested or does not change functionality -
This MR has correct commit message format
Other information
Goal is to prevent out of memory issues when clients process big bulk of messages. In principle, everything should work the same as until now, since client repetitively read last messages anyway and they will get them in proper order.
Related issues
none