[JAVA-3687] Observable.zip().head() often emits null Created: 20/Mar/20 Updated: 28/Oct/23 Resolved: 15/Apr/20 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API, Scala |
| Affects Version/s: | 4.0.2 |
| Fix Version/s: | 4.0.3, 4.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeff Mather | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I have this code stanza in a repository's fetchVideos() method: val find = collection.find(query).skip(numToSkip).limit(videosPerPage) It is intended to return a future containing a tuple of:
so, a Future[(Seq[Video], Long)] to enable pagination of search results for videos. Instead, it often returns null as the future value. Not always, but usually. When null is not the future value, the result is often correct, though not always. I have since gone on to serialize the two database accesses using a flatMap(), and that works as expected, but it seems to me like a bug that the above parallelization of these accesses does not also work. |
| Comments |
| Comment by Githook User [ 15/Apr/20 ] |
|
Author: {'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}Message: ZipObservable fix
|
| Comment by Githook User [ 15/Apr/20 ] |
|
Author: {'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}Message: ZipObservable fix
|
| Comment by Ross Lawley [ 14/Apr/20 ] |