• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool-java / 271
69%
master: 78%

Build:
Build:
LAST BUILD BRANCH: Totktonada/remove-gitter-badge
DEFAULT BRANCH: master
Ran 04 Apr 2019 09:25AM UTC
Jobs 1
Files 35
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
271

Pull #145

travis-ci

web-flow
Race condition in TarantoolClientImpl

- Avoid a possible race between reading, writing and reconnecting
threads when a reconnection process is started.
It might have happened that the lagged thread (reading or writing) could
reset the state to RECONNECT after the reconnecting thread has already
started and set the state to 0. As a result, all next attempts to
reconnect will never happen. Now the reconnect thread holds on the state
as long as it is required.

- Avoid another possible race between reading and writing threads when
they are started during the reconnection process.
It might have happened that one of the threads crashed when it was
starting and another slightly lagged thread set up its flag. It could
have led that the reconnecting thread saw RECONNECT + R/W state instead
of pure RECONNECT. Again, this case broke down all next reconnection
attempts. Now reading and writing threads take into account whether
RECONNECT state is already set or not.

- Replace LockSupport with ReentrantLock.Condition for a thread to be
suspended and woken up. Our cluster tests and standalone demo app show
that LockSupport is not a safe memory barrier as it could be. The
reconnect thread relies on a visibility guarantee between park-unpark
invocations which, actually, sometimes doesn't work. Also, according to
java-docs LockSupport is more like an internal component to build
high-level blocking primitives. It is not recommended using this class
directly. It was replaced by ReentrantLock.Condition primitive based
on LockSupport but which has proper LockSupport usage inside.

Fixes: #142
Affects: #34, #136
Pull Request #145: Race condition in TarantoolClientImpl

51 of 51 new or added lines in 1 file covered. (100.0%)

1465 of 2273 relevant lines covered (64.45%)

0.64 hits per line

Jobs
ID Job ID Ran Files Coverage
3 271.3 04 Apr 2019 09:25AM UTC 0
64.45
Travis Job 271.3
Source Files on build 271
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #271
  • Pull Request #145
  • PR Base - master (#263)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc