-
Notifications
You must be signed in to change notification settings - Fork 6
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
freeze in case of large integer secondary keys (over 2^63) #11
Comments
Couple of questions - what version of Riak are you testing this against? |
riak version: 1.4.8
Meanwhile, I found that certain objects seem to cause this behaviour (if I exclude their keys from the keylist, the dump succeeds). The offenders I found (by analysing them using the REST interface manually) has larger amount of secondary indices (over 100), while the others have less. My real problem with riak-data-migrator is that I can query all those failed keys I found (about 10 keys in the 50 I checked) together in less than a minute using REST, and e.g. an entry with 122 secondary keys can be wget-ed in 0.02sec, while riak-data-migrator chokes on it completely. One more interesting thing is that it does not matter where the offending key is in the list, I do not even get a partial result, even if I specify |
Upon more investigation, it seems that the dump hangs if there are objects with integer-type secondary keys. I will try to get a more definite proof by modifying my test bucket. |
Upon testing with integer indices, I found out that the error manifests itself if there is an integer index greater than or equal to 2^63 (2^63-1 is fine), so this seems to be a long int problem. I am not sure how to resolve it, as it probably affects the serialisation format currently used. If I will have some more time, I will try to tinker with the source to create a patch. To reproduce:
Interestingly, I do get a Also, there is nothing in the riak-data-migrator-error.log and riak-data-migrator-status.log that are created during the process. |
Ah, ok, yeah, I think this might be related to basho/riak-java-client#112 |
Also, I have to warn -- 100 indices on an object is way too many. Your read and write performance (let alone backup) is going to suffer. |
basho/riak-java-client#112 seems to indicate that they now use long instead of int. However, that would cause the exact behaviour that I observed, as we would need to have arbitrary precision integers to conform with the BP and REST interface. |
We do have to have 100 and more indices -- we use it for an inverted index on the documents (kind of yokozuna replacement - that won't be available anyway until riak 2.0). We could of course use primary keys and manual conflict (non-)resolution to simulate the current workings, but did not have the time for that yet. We have really considered the options, but none seem to be plausible. |
EDIT: For a concise description of the bug in the title you can read my last comment.
Using ten dumped keys, I created a small key list file, and tried to dump those keys:
java -jar riak-data-migrator-0.2.6.jar -d -r ./ --loadkeys sample.keys.txt -h IP -p 8087 -H 8098
The output is:
Dumping bucket BUCKET
and the program just sits there doing nothing, at least for half an hour (after that I killed it).
After that I tried getting the objects in sample.keys.txt using curl, and succeeded.
After this, I created a test bucket with some data in it manually, and the dump seemed to be successful.
What to do now? How can I trace what the seemingly halted program is doing? How can I avoid having that timeout?
The text was updated successfully, but these errors were encountered: