The race condition that TableDataManager is removed during segment download because of incorrect segment count.
See original GitHub issueCurrent code does the followings:
tableDataManager
usessegmentDataManagerMap
to track the segments.tableDataManager
is created and initialized when adding the first segment to the server, and shutdown if the last segment is removed.- The
tmp
directory for temporarily storing new downloaded segments will be removed and recreated as part oftableDataManager
initialization. - When adding a new segment to server, the server will download the segment first and update the segmentDataManagerMap after.
This can cause two issues:
- If the last segment is removed from
segmentDataManagerMap
during new segment download time and before updatingsegmentDataManagerMap
, thetableDataManager
will be shutdown, and the new segment will become unreachable. We will have partial query results withSERVER_SEGMENT_MISSING_ERROR
. - If
tableDataManager
is initialized during the segment download in scenario 1, the downloaded tar file will be removed. The server will take it as download failure, and the segment will stay inERROR
state until fixed manually by restarting the server. We have observed this issue recently after #7961 was merged.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Tracking down a race condition in the Apache Trafficserver ...
In some cases, the only existing documentation is flat out wrong. ... are writing in the other's segment, we avoid race conditions on...
Read more >How can I delete segments from a failed download · Issue #1275
I am using Shaka player 2.2.8. I tried to download a video and got an error about halfway through (due to a bad...
Read more >Setting a Segment to Adjust Automatically
You can set your device to automatically adjust the target race time of a segment based on your performance during the segment.
Read more >How we found and fixed a rare race condition in our session ...
Reports from users. On March 2, 2021, we received a report via our support team from a user who, while using GitHub.com logged...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After some offline discussion, one way to solve this issue is to add a
DELETE
message, and only remove thetableDataManager
when the table is deletedhas this been resolved? can the issue be closed?