Hi, I have a strange error occuring very rare during the tests of the database file record reading, with the usage of RadomAccessFile.
Then I execute the
JUnit test when many threads trying to read random record and get this strange result:
I start with populating the static cache of database in the JUnit during the junit class loading (similar to JUnit4 beforeClass()):
After that, many threads are created, each one trying to read some random record:
And the simple code of RecordReader
thread:
It happens very rare and with different records, no matter if a set the thread count to 10 or to 100. I looked through the log and found no other threads trying to change the file pointer. Do you have any idea of what can be wrong?