Repository navigation
QueueCacheMissException #844 Fix - #849
Conversation
The cache cursor for the first stream is becoming inactive while there is data still being delivered on the second stream. Since data is being delivered on the second stream the cache is moving forward in time and when we try to refresh the cache cursor for the first stream, it is older than any of the data in the cache, so it throws a cache miss. When we refresh a cursor, if it's token is no longer in the cache, we start from the oldest data in the cache.
|
Jason, you will have to explain it better to me. I don't dig this change. Maybe concrete example with sequence tokens will help. |
|
"in the new code MoveNext can throw and it is OK" "You will have to explain it better to me"
The fix is to change the cursor and cache interaction such that, when reinitializing an existing cursor (not a new cursor), we make a best effort to read from the cursor's value, but if that fails, we try from the start of the cache. |
|
Thanks! I will take detailed look at that. |
|
Ok, Thanks! I got it now. Very detailed and good explanation.
|
|
And its great you added the test that reproes it. |
|
@gabikliot |
|
"bundled unrelated changes" - Ninjaneering for the win!! :) |
|
Re: 2.b - "and can never fail" needs more discussion |
- InitializeCursor bestEffort was replaced with enforceQuenceToken and default value was dropped.
QueueCacheMissException #844 Fix
The cache cursor for the first stream is becoming inactive while there is data still being delivered on the second stream. Since data is being delivered on the second stream the cache is moving forward in time and when we try to refresh the cache cursor for the first stream, it is older than any of the data in the cache, so it throws a cache miss.
When we refresh a cursor, if it's token is no longer in the cache, we start from the oldest data in the cache.