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

Windows compatibility #161

Closed
valeriansaliou opened this issue Jul 21, 2019 · 7 comments
Closed

Windows compatibility #161

valeriansaliou opened this issue Jul 21, 2019 · 7 comments
Assignees
Labels
enhancement Enhancement to an existing feature
Milestone

Comments

@valeriansaliou
Copy link
Owner

Sonic currently does not run on Windows. @Git0Shuai has made a fix that seemingly allows Sonic to run on Windows, see: Git0Shuai@a268f7e

@valeriansaliou valeriansaliou added the enhancement Enhancement to an existing feature label Jul 21, 2019
@valeriansaliou valeriansaliou added this to the v1.3.0 milestone Jul 21, 2019
@valeriansaliou valeriansaliou self-assigned this Jul 21, 2019
@Git0Shuai
Copy link
Contributor

The dependency graceful dosen't work on windows and I tried to fix that, but the crate seems not maintained anymore. (see fix build error on windows)

@valeriansaliou
Copy link
Owner Author

I'll be integrating it right away its code in Sonic, it's minimal-enough. Is your PR to graceful complete / do you have anything to add?

@valeriansaliou
Copy link
Owner Author

graceful has been moved to Sonic, w/ your fork contents. I've confirmed this works on MacOS (w/ nix); can you confirm it compiles and works on Windows? (+ confirm that you see debug log line: (INFO) - stopping gracefully (got signal: 2) in Sonic after sending a SIGTERM).

@valeriansaliou
Copy link
Owner Author

valeriansaliou commented Jul 23, 2019

Refer to commit 7d1fdc4

@Git0Shuai
Copy link
Contributor

it compiles, but I get following output after pressing Ctrl-C

(INFO) - stopping gracefully (got signal: 0)
(DEBUG) - scanning for kv store pool items to flush to disk
(INFO) - no kv store pool items need to be flushed at the moment
(DEBUG) - scanning for fst store pool items to consolidate
(INFO) - no fst store pool items to consolidate in register
(INFO) - stopped
thread 'sonic-channel-master' panicked at 'cannot access stdout during shutdown', src\libcore\option.rs:1036:5

@valeriansaliou
Copy link
Owner Author

It's all right, it's a non-main thread which would close all TCP connections for Sonic Channel sessions w/ Sonic. From what I can see from your log, the essentials (databases) are synchronized properly to disk before shutdown.

@valeriansaliou
Copy link
Owner Author

You could probably try to add eg.:

thread::sleep(Duration::from_secs(2));

Before:

info!("stopped");

And see if it still panics when you have a Sonic Channel session running. We probably need to give more time to the TCP output layer to flush itself w/ the client before complete shutdown.

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

No branches or pull requests

2 participants