Commit Graph

5017 Commits (dd871d61fd763d252d3b19bb2123f7ab1f6a8c65)
 

Author SHA1 Message Date
Nikita Koksharov d516570c83
Update README.md 6 years ago
Nikita Koksharov e02a319466
Update README.md 6 years ago
Nikita Koksharov 3d2a098ad0
Update README.md 6 years ago
Nikita Koksharov 9b67dc6daa Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov cd595c130b Feature - Async, Reactive, RxJava2 interfaces added to JCache. #2059 6 years ago
Nikita Koksharov b1a863782c
Merge pull request #2091 from welkinbai/master
fix bug: in RedissonNodeConfig constructor with oldConf, miss mapRedu…
6 years ago
Nikita Koksharov 0cca617c78 Fixed - Spring Session PRINCIPAL_NAME_INDEX_NAME session attribute has incorrect name 6 years ago
Nikita Koksharov 9728f29ea9
Merge pull request #2085 from jchobantonov/master
UpdateValve needs to execute manager.store only once at the end of the request #2084
6 years ago
Justin Corpron 6dbc972b6c Fix timeout drift in RedissonFairLock
This change alters how timeouts are calculated for threads added into the queue
when the lock cannot be immediately acquired, and adds logic to reduce the
timeouts when a thread leaves the queue by either acquiring the lock or timing-
out while waiting. Tests have been added to ensure that the added and altered
lua code is necessary to provide the documented behavior of the fair lock, and
that the changes do not break existing desired behavior.

The timeout drift issue is resolved by decreasing the timeouts in the
redisson_lock_timeout sorted set when a thread is removed from the queue. This
logic was added to the tryLockInnerAsync lua code (both variations) in the
branch where the lock is successfully acquired, and in this case all timeouts
except the timeout being removed from the queue are decreased by threadWaitTime.
Additionally, the existing lua code in acquireFailedAsync was changed to always
decrease the timeouts regardless of where the removed thread is in the queue,
however this requires that the queue be traversed to determine the position of
the thread being removed is in the queue so that only those threads after it
have their timeouts decreased. The existing code also had the behavior where if
the 1st and 2nd threads in the queue were removed via acquireFailedAsync, the
TTL for the 3rd thread would equal the lock TTL and it would not be able to
acquire the lock fairly if the lock expired. This change requires the change to
the timeout calculation in order to fix both the timeout drift and the unfair
timeout decrease problems of the existing code.

The existing timeout calculation at the end of the lua code for
tryLockInnerAsync in the tryLock w/ waitTime call path used to be either the
lock timeout value + 5s for the first thread in the queue or for the other
threads in the queue the value was essentially the first thread's timeout + 5s.
This second rule for the 2nd thread is correct per the documentation, but for
the 3rd to the Nth thread, the timeout would not allow these threads to acquire
the lock fairly within 5s after the prior thread if the 1st and 2nd thread died
since their timeouts are the same as the 2nd thead, and this is contrary to the
documentation which provides 5s per thread in the queue. The new code sets the
timeout for a thread added to the queue to 5s plus the timeout of the thread at
the end of the queue; there is always a check now to see if the thread that has
failed to acquire the lock in the lua script is already in the queue, and if it
is already in the queue, then the lua code returns the approximate ttl based on
that thread's current timeout (timeout - 5s).

Note that the "remove stale threads" while loop was not altered even though it
also removes threads from the queue. This is the expected behavior and was
preserved, and some added tests now check the timeout expiration behavior.
6 years ago
Fernando Giannetti 3716299bea
Add natMap for Sentinel configuration 6 years ago
Nikita Koksharov aec2460b76 Fixed - AsyncSemaphore doesn't notify sleeping threads with permits more than one. #2095 6 years ago
Nikita Koksharov f2703e7526 Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov 355b25a4b4 Fixed - RedisTemplate.radius and RedisConnection.geoRadius throw IllegalArgumentException during response decoding. #2093 6 years ago
xiaoxuan.bai 7771c40434 fix bug: in RedissonNodeConfig constructor with oldConf, miss mapReduceWorkers value set 6 years ago
Zhelyazko Chobantonov c281910669 UpdateValve needs to execute manager.store only once at the end of the request #2084 6 years ago
Nikita Koksharov d3acc0249b
Update README.md 6 years ago
Nikita Koksharov 83f10b120c Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov cf1404c960 refactoring 6 years ago
Nikita Koksharov 6e517726ff
Merge pull request #2041 from apemost/fix-readme
Improve syntax highlighting
6 years ago
Andrew Lyu 5be3e93356
Merge branch 'master' into fix-readme 6 years ago
Nikita Koksharov 1224cbf1bf
Update CHANGELOG.md 6 years ago
Nikita Koksharov a0b95c0667
Update CHANGELOG.md 6 years ago
Nikita Koksharov f7d80085de
Update README.md 6 years ago
Nikita Koksharov 8a10339f3d
Update README.md 6 years ago
Nikita Koksharov e5d23becf7
Update CHANGELOG.md 6 years ago
Nikita Koksharov 3e110e033e [maven-release-plugin] prepare for next development iteration 6 years ago
Nikita Koksharov 7597274a3f [maven-release-plugin] prepare release redisson-3.10.7 6 years ago
Nikita Koksharov b338a5f035 refactoring 6 years ago
Nikita Koksharov 8f20f97e34 Feature - range method added to RList, RListReactive and RListRx interfaces. #2080 6 years ago
Nikita Koksharov 89daf178d9 Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov 07f2e9af7a checkstyle error fixed 6 years ago
Nikita Koksharov eed760548a
Merge pull request #2075 from jchobantonov/master
Use codec that is classloader aware fix for #2071
6 years ago
Nikita Koksharov da41773a8b Fixed - disconnected sentinels shouldn't be listed in sentinel list. #2067 6 years ago
Nikita Koksharov 5f4ec21cc9 Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov 9146078ae3 Improvement - 10X Performance boost for JCache.putAll method #2079 6 years ago
Nikita Koksharov fb9d472650
Update README.md 6 years ago
Nikita Koksharov c4dc2128bc
Update README.md 6 years ago
Zhelyazko Chobantonov 2d08717e43 Use codec that is classloader aware fix for #2071 6 years ago
Nikita Koksharov bfb313306b
Merge pull request #2070 from jchobantonov/master
when using findSession check if the session exists in Redis first before creating a new one - a fix for #2019
6 years ago
Zhelyazko Chobantonov 7406b524c6 do not use isExists() method on RMap just get the map and check if the map is not empty 6 years ago
Nikita Koksharov 689f7c95e9 Fixed - LiveObject field with Map type couldn't be persisted. #2061 6 years ago
Nikita Koksharov c9bffacbdd Feature - MILLISECONDS option added to RRateLimiter.RateIntervalUnit object #2073 6 years ago
Nikita Koksharov 328e070873 Fixed - RRateLimiter allows permits exceeding #2072 6 years ago
Nikita Koksharov 184be32c44 Fixed - CompositeCodec.getMapValueDecoder method uses MapKeyDecoder instead of MapValueDecoder #2068 6 years ago
Zhelyazko Chobantonov 7a92208f0a when using findSession check if the session exists in Redis first before creating a new one - a fix for #2019 6 years ago
Nikita Koksharov 98c73ccc14 refactoring 6 years ago
Nikita Koksharov 765d6ed129 Fixed - Memory leak during Queue blocking methods invocation. #2055 6 years ago
Nikita Koksharov a056a200ca Fixed - JCache.removeAll method doesn't notify Cache listeners #2056 6 years ago
Nikita Koksharov c15ceba759 Merge branch 'master' of github.com:redisson/redisson 6 years ago
Nikita Koksharov b6f6931971 Improvement - JCache.getAll execution optimization for non-existing keys. 6 years ago