[JAVA-1574] Confusing local variable name in BaseCluster Created: 28/Nov/14 Updated: 11/Sep/19 Resolved: 25/Nov/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Ross Lawley | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Whilst debugging async I noticed:
getAndSet returns the previous value - so is the countdown wrong or should it be the new phase thats counted down? |
| Comments |
| Comment by Jeffrey Yemin [ 07/Dec/15 ] | |
|
The 3.2.0 driver, which contains a fix for this issue, has been released today. | |
| Comment by Githook User [ 25/Nov/15 ] | |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: | |
| Comment by Ross Lawley [ 28/Nov/14 ] | |
|
ok getAndSet returns the old latch and not the newly set one which is why the name "current" is confusing as its the previous latch thats counted down. Propose change to:
| |
| Comment by Jeffrey Yemin [ 28/Nov/14 ] | |
|
This code is correct. Operations needing a server are waiting on the current latch so that's the one that needs to be counted down. |