Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed command aggregation for legacy indexes #6022

Merged
merged 1 commit into from Dec 7, 2015
Merged

Fixed command aggregation for legacy indexes #6022

merged 1 commit into from Dec 7, 2015

Conversation

lutovich
Copy link
Contributor

@lutovich lutovich commented Dec 3, 2015

LegacyIndexTransactionStateImpl is responsible for tracking node/relationship additions and removals. It uses two separate maps for this. Each map has index name as a key and list of corresponding commands as a value. When index is dropped, corresponding list of commands is cleared.

However additions to relationship legacy index ended up in the map dedicated to node legacy index and removals from relationship legacy index cleared commands from the node map. In particular this was a problem for node and relationship indexes that had same name. It could lead to missing entries in the legacy index after transaction completed successfully.

This commit makes LegacyIndexTransactionStateImpl use relationship map for relationship commands. It also improves equals/hashCode methods for legacy index commands.

LegacyIndexTransactionStateImpl is responsible for tracking node/relationship
additions and removals. It uses two separate maps for this. Each map has index
name as a key and list of corresponding commands as a value. When index is
dropped, corresponding list of commands is cleared.

However additions to relationship legacy index ended up in the map dedicated
to node legacy index and removals from relationship legacy index cleared
commands from the node map. In particular this was a problem for node and
relationship indexes that had same name. It could lead to missing entries in the
legacy index after transaction completed successfully.

This commit makes LegacyIndexTransactionStateImpl use relationship map for
relationship commands.
It also improves equals/hashCode methods for legacy index commands.
@chrisvest
Copy link
Contributor

Nice bit of testing 👍

chrisvest added a commit that referenced this pull request Dec 7, 2015
Fixed command aggregation for legacy indexes
@chrisvest chrisvest merged commit 994db75 into neo4j:2.2 Dec 7, 2015
@lutovich lutovich deleted the 2.2-legacy-idx-deletion branch December 7, 2015 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants