Chronicle-Queue icon indicating copy to clipboard operation
Chronicle-Queue copied to clipboard

Allow named tailers to be used concurrently to split work #964

Open peter-lawrey opened this issue 4 years ago • 1 comments

Previously the behaviour of concurrent named tailers with the same name was undefined and not supported. This change adds support for splitting work by named tailer by checking whether the index has changed during the call to readingDocument (changing the index in the table store at the end of readingDocument instead of close() ) I have added a test to show it detects and retries if the index is change while readingDocument is being performed.

peter-lawrey avatar Dec 03 '21 12:12 peter-lawrey

Apologies for pushing to the branch, but I just added a test to the test class that runs concurrent competing consumer threads and it doesn't seem to work. Perhaps I've missed something, alarmingly the test breaks even for a single consumer. ~I will note there's another test that relies on named tailers which displays similar behaviour occasionally (in QE, UngracefulShutdownTest, the same excerpt is read twice). I had always assumed the test was broken but maybe named tailers is?~ I checked and this test passes on develop, so whatever the issue is, it's introduced (or made significantly more likely) by the changes on this branch

nicktindall avatar Dec 06 '21 05:12 nicktindall