Change in ovirt-engine[master]: core: Avoid sync on inserting into infinispan

Code Review gerrit at ovirt.org
Mon May 8 14:51:50 UTC 2017


>From Roy Golan <rgolan at redhat.com>:

Roy Golan has submitted this change and it was merged.

Change subject: core: Avoid sync on inserting into infinispan
......................................................................


core: Avoid sync on inserting into infinispan

Motivation:
According to change d2bc14d6d21cb7e02f976d88aa83d3aa47ab1709, Anti-flood
usage of infinispan used to suffer from 'putIfAbsent' bug in
infinispan Cache, that made inserted records inserted without lifespan.

Change:
Since this behavior doesn't seem to exist I'm reverting it and removing
the need to synchronize and use again

 putIfAbsent(key, val, lifespan, unit) // seem to work as expected

Result:
Verified using tons of concurrent login using REST API and making sure
the log in log is inserted only every 5 seconds:

 User admin at internal-authz logged in  // seeing this evert 5 seconds
 even though there are multiple logins per second

Change-Id: Iaa2f1ac32a1abe7483239108266c78736d953ad1
Signed-off-by: Roy Golan <rgolan at redhat.com>
---
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/EventFloodRegulator.java
1 file changed, 7 insertions(+), 12 deletions(-)

Approvals:
  Eli Mesika: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Roy Golan: Verified
  Moti Asayag: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/76267
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa2f1ac32a1abe7483239108266c78736d953ad1
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list