https://issues.redhat.com/browse/ISPN-14428
A couple of things here:
- Key tracker allows duplicates;
- The IntSet keeping track segments not completed;
The latter I guess is a visibility issue. We have only a single outstanding request for each target, but we have a concurrency of # of target servers. We update by removing the completed segments when a response is received, and the flowable uses the segment again to request the not completed. Not sure how to create a test for this, tough.
A log from a local execution:
18:18:42.200 INFO [org.jabolina.playground.TestHotRodClient] (1) SIZE: 10
18:18:42.200 INFO [org.infinispan.client.hotrod.impl.iteration.RemotePublisher] (15) [HotRod-client-async-pool-1-1] Segments left to process are {60-62 79-91 103-107 113-115 117-122 187-202 205 209-216 218-234 238-249} <--- Causes a request for these segments again.
18:18:42.202 INFO [org.infinispan.client.hotrod.impl.iteration.RemotePublisher] (18) [HotRod-client-async-pool-1-4] Segments left to process are {} <--- After receiving the segments.
18:18:42.202 INFO [org.jabolina.playground.TestHotRodClient] (1) KEYS [10]: [test4, test3, test1, test6, test9, test7, test2, test8, test5, test10, test6]
18:18:42.202 INFO [org.jabolina.playground.TestHotRodClient] (1) FOUND 10 KEYS