eclipse-vertx / vertx-auth

Apache License 2.0
160 stars 153 forks source link

Initial work, Authorizations are now CoW Immutable which should solve… #635

Closed pmlopes closed 1 year ago

pmlopes commented 1 year ago

… issues with multiple access across event loops

pmlopes commented 1 year ago

@bfreuden this should address the issue #541

The idea is that in vert.x 5 as we can break APIs we make the Authorizations a Immutable data structure and apply CoW semantics so multiple threads can access and see the data they saw when started, and not be afected by future mutations.

pmlopes commented 1 year ago

The PR is still draft as I'd like to get rid of the add method which causes too much copies (ATM it only affects 20 places in tests) and your reproducer is always green for me.

pmlopes commented 1 year ago

The reproducer now works 100% good and it takes 1.3s to execute vs 2.6s with lock

bfreuden commented 1 year ago

@pmlopes Wow! Thank you so much! :+1: Can't wait to try it out!