Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit changes the way recovery works, with the main driving force to have index updates be replayed as they were during normal transaction application before the crash or otherwise unclean shutdown. Previously index recovery was special and worked by recording which nodes that were changed in recovered transaction followed by a complete reindex of those nodes in all existing indexes. Besides the downside of requiring special recovery code it also put on the index the requirement of being able to efficiently delete index entries about a certain node id, i.e. to be able to efficiently do lookups on node id. This worked in the Lucene case, but doesn't work for the native number index, which only keys on the property values. Index recovery worked this way because the act of producing index updates from a transaction in many cases requires reading data from the store. It would be incorrect and often impossible to read from the store while it was recovering. Now this has changed so that indexes participate in and see normal index updates during recovery. The enabler for this is to first do a reverse recovery where all the "before" versions of all transactions since the last checkpoint are applied in reverse order onto the neostore only. This takes the store back in time to how it looked at the checkpoint and into a consistent state. From there a forward recovery is performed where indexes participate as they would in normal transaction application. Interesting to note is that the changes, and with some additional changes, has made recovery both faster, due to: - The previous reindexing in the end was rather slow. - LockService was used when applying recovered transactions, to no benefit. ... and less memory consuming, due to: - Lowering of recovery transaction queue size from 10k --> 100, where there was no observed performance benefit having the queue so large. The amount of memory required to hold 10k large transactions could be gigabytes. - Memory efficient implementation of reverse transaction cursor. So recovery is now more straight forward, faster and more memory efficient. And above all, it works nicely with our native schema indexes.
- Loading branch information
Showing
73 changed files
with
2,141 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.