apache / horaedb

Apache HoraeDB (incubating) is a high-performance, distributed, cloud native time-series database.
https://horaedb.apache.org
Apache License 2.0
2.63k stars 206 forks source link

Support running on Windows #1527

Open jiacai2050 opened 6 months ago

jiacai2050 commented 6 months ago

Describe This Problem

Background: https://github.com/apache/incubator-horaedb/issues/1411#issuecomment-2102159948

Although Windows is not recommended as production env, it's convenient for testing and develop.

Proposal

We have two choices:

Method 1 maybe simpler than 2, but I little experience here, so welcome any voltenner to tackle this issue in either ways.

Additional Context

No response

kcrazy commented 6 months ago

I tried to compile it on Windows, but the compilation failed when it reached pprof because pprof uses the crate nix and libc, which are not supported on Windows.

jiacai2050 commented 6 months ago

Thanks for trying.

I think you can add a feature gate on that crate, and see what happens next.

kcrazy commented 6 months ago

The repository at rust-rocksdb also does not support Windows.

jiacai2050 commented 6 months ago

The repository at rust-rocksdb also does not support Windows.

Try build with make build-wal-message-queue, this will disable rocksdb and use kafka as wal.

kcrazy commented 6 months ago

The repository at rust-rocksdb also does not support Windows.

Try build with make build-wal-message-queue, this will disable rocksdb and use kafka as wal.

Can we directly use cargo to replace make?

tanruixiang commented 6 months ago

The repository at rust-rocksdb also does not support Windows.

Try build with make build-wal-message-queue, this will disable rocksdb and use kafka as wal.

Can we directly use cargo to replace make?

Of course you can, our makefile is very simple, you can refer to the https://github.com/apache/incubator-horaedb/blob/main/Makefile#L40

jiacai2050 commented 6 months ago

If you're interested in contributing more, welcome to join our community.

kcrazy commented 5 months ago

If you're interested in contributing more, welcome to join our community.

I don't have much experience in developing databases and I'm not particularly interested at the moment. However, I'm open to occasionally testing builds on Windows.

kcrazy commented 5 months ago

The repository at rust-rocksdb also does not support Windows.

Try build with make build-wal-message-queue, this will disable rocksdb and use kafka as wal.

Can we directly use cargo to replace make?

Of course you can, our makefile is very simple, you can refer to the https://github.com/apache/incubator-horaedb/blob/main/Makefile#L40

I tried using the command

cargo build --no-default-features --features wal-message-queue

but encountered some issues with jemalloc: jemalloc-sys@0.3.2 states that 'jemalloc support for x86_64-pc-windows-msvc is untested'.

jiacai2050 commented 5 months ago

Thanks for testing, I will add a feature gate for jemalloc and pprof this week, so you can disable them on Windows.