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

array_block_size is bugged in 2.3.1 #6133

Closed
rickardoberg opened this issue Dec 17, 2015 · 2 comments
Closed

array_block_size is bugged in 2.3.1 #6133

rickardoberg opened this issue Dec 17, 2015 · 2 comments

Comments

@rickardoberg
Copy link
Contributor

In Neo4j Community 2.3.1, if I start a database with array_block_size set and then create nodes with large strings and byte arrays, reading the database will fail. Seems like the dynamic string store also uses the array_block_size setting for reading, but not when creating records, so you get InvalidRecordExceptions.

Workaround: set string_array_size to same as array_block_size. Records will now be created with same size, so reading does not crash.

Minimal test case attached.
ArrayBlockSizeBugTest.java.zip

@rickardoberg
Copy link
Contributor Author

Ok, found the problem:
https://github.com/neo4j/neo4j/blob/2.3/community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StorePropertyPayloadCursor.java#L259

The method can get string or array store, but only keeps one cursor. It should keep one per store. Now if I first read from array store, that cursor will be assigned, and then if I read a string the array store cursor will be reused, which fails with InvalidRecordException. There needs to be one cached cursor per store, basically.

@spacecowboy
Copy link
Contributor

Thanks, I added a Trello card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants