DatafileManager.importMapFiles question
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 487
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 13
Description
The Tablet metadata is updated in `DatafileManager.importMapFiles` [here](https://github.com/apache/accumulo/blob/2.1/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java#L265) outside of the tablet lock. Then, the `datafileSizes` map is modified inside of the Tablet lock [here](https://github.com/apache/accumulo/blob/2.1/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java#L274). [`Tablet.compareTabletInfo`](https://github.com/apache/accumulo/blob/2.1/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java#L1141) is called from a thread in the TabletServer periodically. Does updating the tablet metadata outside of the tablet lock in `importMapFiles` make it more likely that the `compareTabletInfo` check would see a file in the tablet metadata but *not* in datafileSizes? It seems to me that if `compareTabletInfo` ran between Tablet line 265 and line 269, then it would report missing files that may not be missing.
Contributor guide
Research direction
Start by reading DatafileManager.importMapFiles around lines 265-274, then inspect Tablet.compareTabletInfo around line 1141 and its periodic TabletServer caller. Trace the metadata and datafileSizes updates under concurrent execution. Done means establishing whether the interleaving can produce a false missing-file report and recording the required follow-up or confirming the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100