[JAVA-1973] AbstractSubscription implementations need to track completed Created: 21/Sep/15 Updated: 07/Oct/15 Resolved: 21/Sep/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Async |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | 3.1.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ross Lawley | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As multiple requests for data can occur before data is available, then implementations of AbstractSubscription must handle when the Subscriptions completed state. Currently, completed defaults to true - so there is a race condition on multiple calls to request between the requesting initial data and then the processing of results that looks at the completed state. If results haven't come in it shortcuts to calling onComplete. |
| Comments |
| Comment by Jeffrey Yemin [ 07/Oct/15 ] |
|
Released in 3.1.0 |
| Comment by Githook User [ 21/Sep/15 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Made checkCompleted abstract in AbstractSubscriptions There is no guarantee that there would be single calls to request before data arrives. Tracking completed state fixes a potential race conditions for Subscriptions to SingleResultCallbacks.
|