Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
REVIEW: NXCM-4867 - Index update concurrency problem #848
These changes fix a synchronization problem caused by attempting an incremental index update when an incremental update is not possible, and a full index update must be performed. In this case, since the maven indexer did not support a way to request an incremental-only update, it was not possible to know the appropriate locking mechanism to use for the update.
Previously, we were grabbing a read-only lock to perform the incremental update. But in cases where an incremental was not possible, and a full index update was performed, there was a window towards the end of the full index update where another thread attempting to read the index could experience an NPE.
The maven indexer has been updated to allow clients to specify an incremental-only index update. These changes take advantage of this new support. If an incremental update is not possible, then a full index update is performed with the appropriate locking
CI build on the way