-
Notifications
You must be signed in to change notification settings - Fork 149
Fix: regarding PR #110 edge cases #113
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
Conversation
Apologies if I am being thick here, buy why can't you just remove the lock in the callback from |
I'm not sure I understand, are you talking about |
My bad, a bit distracted. I meant
Later on in
Keeps read/write asynchronous, but at a cost of being a bit uglier. |
Oh, now I see. You are write, that's actually an even better idea, and since the |
Better to actually handle the error though:
|
Yes, I do agree, error handling is a must. |
and lock the server ID while I/O event, thanks to @swist
Most of the tests actually failed this time. Except the FFFFF..., the fail error message is
I guess you will also see the similar error if you run locally too. I reverted the commits to protect from duplicates in the known_host file to let the test system avoid redness everywhere. So pls do a rebase and add the reverted commits back to solve the conflicts. This PR is too hard for me to understand, so I am calling help from our JS export :) |
@zhenlineo I find this really weird as all the test pass except |
@legraphista @zhenlineo what do I need to do to have a look at team city builds? I have sent the CLA over. Been trying to reproduce the error locally, but I am getting only the same error as @legraphista |
@legraphista @swist Pls rebase your PR. But as I reverted your previous change for the duplicates in known_host file. So using the following git code to fix the conflicts with 1.0:
FYI: The "fix" for the Let me know if you feel hard to rebase, then I will bring a new PR with your new commit for you. |
Or maybe |
Sorry for the delay @legraphista and @swist. With #116 cherry picked on top of this pr, all tests passes locally for me where they used to fail just like they did for @zhenlineo (because of dir I'll have a deeper look at the actual contents of this PR later today. |
I had to rewrite parts of #116 to make it work on windows, so don't look too much on that code :) So if you could rebase or solve the conflicts like @zhenlineo described we'll happily merge this. |
…erprint-duplication-error/1.0 # Conflicts: # src/v1/internal/ch-node.js
@oskarhane Rebasing would delete chunks of PR #116, so I did a merge from upstream 1.0 instead. |
Thanks @legraphista, but I think your test |
@oskarhane I'm sorry for the delay, i've re-added the missing test. |
No worries @legraphista, thanks a lot. |
This code was in PR #113, but got lost in merge process
Regarding PR #110, in some cases, the file would still duplicate lines and here's an attempt to explain why:
Node Timeline:
[Case 1] Sometimes, if the disk is too slow, The second on('line') will be slower than setImmediate but still faster than setTimeout
[Case 2] Set timeout is low priority and is ran after all queued execution blocks for that tick
This can still duplicate if the disk is really slow at reading the
I/O Task #2
chunk but setting a timeout of 0 should cover most of the cases.