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
(WIP) Bug rad reverse sorting #1021
Conversation
I used this to test locally
|
@alterx yay for helping fix bugs! Very much appreciated. The fact Martti can run this with Iris and no problems is a big win / indication it is correct. Sorry I've been bogged down. When we chatted the other day it seems like mocha in the browser also had the same failure as NodeJS, so we should review that before pulling (bleeh ugh I hate saying this). I 100% predict it is bug in my code tho, not yours. My mental state hasn't been very good tho to see why (tho I'm excited jibbery that you've done this!), so is it OK if I don't pull quite yet? I feel sad I've been the bottleneck :( |
@amark no problem, I need to find some time to figure out why this is not working inside the test. I definitely think we should wait until there's at least one functional unit test, this way it won't break again in the future. One thing that's worth noting is that the previous test was being explicitly skipped, maybe an indication that this issue with testing reverse happened before? |
Let's dive this PR. This thing is very important. I'm more than excited to see this epic PR get merged. |
@alterx The test was unsuccessful on my browser (and neither on Node) |
@alterx @amark OK I found a clue. If you run the RAD query right after put(), it won't work. But if you run the RAD query in another browser session, after put() ran and the put() command is commented out , and after refreshing your browser, IT WORKS. It seems like the problem is somewhere within gun and this also happens to Nodejs which is the reason why the test fails. @amark I think it is fine to merge this PR, then we could create another issue to find/fix this bug. |
@mimiza @alterx OK, so it means that RAD from disk is correctly returning things in order we expect, however it sounds like GUN's in-memory copy, running radix sorting is failing. Carlos, if you 👍 also I'll go ahead an pull then, cause that means your edit is working and some other code of mine isn't. Tho either of you, please add a |
@amark Carlos seems to be not online for a while. I wonder what happened to him. I don't know how to commit directly to this PR. Could you please add the |
This PR aims to fix the issues with
reverse
when using RAD's lexical querying. I've tested the fix in the browser and it works, but, for some reason, the test is not passing (reverse is not working when running mocha)