Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

alok87
Copy link
Contributor

@alok87 alok87 commented Feb 20, 2020

What?
Typecast the event object only when the event is relevant.

Fixes #334

@alok87
Copy link
Contributor Author

alok87 commented Feb 20, 2020

@grampelberg
Now, after making ksync handle only relevant events, this has issue got fixed, it's not crashing continuously 👍
We can take this PR live. Please check.

@alok87 alok87 changed the title WIP: Handle only the relevant events Handle only the relevant events Feb 20, 2020
@alok87 alok87 changed the title Handle only the relevant events Handle only the relevant events to prevent continuous crash Feb 20, 2020
@grampelberg
Copy link
Collaborator

@alok87 it sounds like this doesn't fix it for you? Seems like a reasonable change either way.

grampelberg
grampelberg previously approved these changes Feb 20, 2020
@grampelberg
Copy link
Collaborator

@alok87 please sign your commits so that I can merge this.

@alok87
Copy link
Contributor Author

alok87 commented Feb 20, 2020

@grampelberg There were 2 issues:

  • First issue: Continous failure due to ERROR event object. This crash of sync, does not clean up the syncthing process which runs on :8384, so the next restart of ksync by our ksync wrapper(practl sync) also fails until the user manually kills the syncthing process. Handling only relevant events fixes it.
  • Second issue is a repeated 1min40sec crash. I have opened a separate issue for it Ksync watcher should reestablish connection #337. Still finding the root cause.

have pushed the signed commit

@timfallmk
Copy link
Collaborator

@alok87 I'm trying to catch up here, so let me see if I'm understanding correctly. When we do an event request, and for some reason the cluster errors out, the returned event doesn't match type and the process fails. Is that right?

If I'm understanding that correctly this change might "fix" it in that it doesn't crash in this case, but it also won't catch any errors. Let me think about this a little bit and see if we can handle it gracefully.

@timfallmk timfallmk merged commit b2ca492 into ksync:master Feb 20, 2020
@alok87
Copy link
Contributor Author

alok87 commented Feb 20, 2020

@timfallmk out of the two issues i mentioned above

  1. In the first (for the issue Ksync keeps crashing  #334) the process was exiting without clearning of syncthing process. But after this fix it is not a problem anymore.
  2. In the second (Ksync watcher should reestablish connection #337), the exit is gracefull already, no dangling syncthing process is left behind.

I will give the PR for catching the error and logging it.

@timfallmk
Copy link
Collaborator

Got it @alok87 . I read it wrong. Looked like you weren't handling any errors from the events stream, but I see what's going on now. Merged and released in https://github.com/ksync/ksync/releases/tag/0.4.4

@alok87
Copy link
Contributor Author

alok87 commented Feb 21, 2020

thanks @timfallmk

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

Successfully merging this pull request may close these issues.

Ksync keeps crashing
3 participants