Comments (15)
@rubo if that is the case, then we may need to tweak the CMake build that is used for Windows. @rhubner any ideas on this one?
from rocksdb.
@theolivenbaum
Yes, but then it will double the size of the distribution package(.jar) and code will be there twice. Once as librocksdb.dll
and second as librocksdbjni.dll
from rocksdb.
Not sure if relevant in this case, but just found this: https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html
This can be used to export symbols from a .dll that are not in any of its object files
but are added by the linker from dependencies (e.g. msvcrt.lib).
More info here too.
from rocksdb.
Perfect, just wanted to confirm that! I've added on our end a separate build for Linux (on top of using the JNI r)eleases) so we can have a librocksd-jemalloc.so, because we very often hit this in production. But that is only affecting Linux so far (and it's on an old RHEL release, so maybe not an issue in newer malloc implementations).
from rocksdb.
Hello @theolivenbaum (cc @rubo)
I just updated #12246 Now we should be able to compile and release .dll on windows with rocksdb functions. The solution is not perfect, but it works. Unfortunately WINDOWS_EXPORT_ALL_SYMBOLS didn't work.
It will be great if you can check the PR and test if the output .dll works for you.
Radek
from rocksdb.
@theolivenbaum You are looking at the names of the JNI interface functions. These exist on all platforms in RocksJava binaries alongside the non-JNI functions. You should also be able to find the non-JNI (i.e. pure C++) API functions too.
from rocksdb.
Looks like the non-JNI functions are not exported for Windows.
from rocksdb.
@adamretter Nothing in my sleeve at the moment, but at least I can replicate what @theolivenbaum mentioned.
from rocksdb.
Any chance this will be addressed in the next release?
from rocksdb.
@rubo It depends on timing. We have a draft PR that @rhubner has prepared but it is still far from ideal (as it currently means having to list all files to export symbols from). We need to find a better approach in that PR - if you have ideas?
from rocksdb.
@adamretter any ideas why this is different than on the Linux/macOS builds?
from rocksdb.
It's a limitation of linker on windows. By default it only exports from the library you are compiling, in our case rocksdbjni. To export symbols from librocksdb you need to provide def file where all symbols are explicitly mentioned. Unfortunately there is no simple solution to generate these symbols automatically.
I have two ideas how to fix this, neither is best:
- First compile rocksdb.dll and then export all symbols and with some PowerShell magic prepare def file.
- Change build that rocksdb and rocksjni will be compiled together. At the moment we first compile rocksdb to .lib and then we compile rocksdbjni.dll and link together.
Radek
from rocksdb.
Wouldn't it be possible to compile just the rocksdb library without the Java methods instead and provide it as part of the package?
from rocksdb.
Another question about the JNI builds: are they built with or without the jemalloc / tcmalloc flags?
from rocksdb.
Another question about the JNI builds: are they built with or without the jemalloc / tcmalloc flags?
Without jemalloc/tcmalloc. We are not at this time planning to support jemalloc/tcmalloc in the Windows builds of RocksJava that are released. If you need that, you will have to build your own binaries. The binaries we release aim to be as portable as possible and have minimal optimisations enabled.
from rocksdb.
Related Issues (20)
- TransactionDB->CreateColumnFamilyWithImport doesn't create valid column family handles HOT 1
- Cache dumper could exit early
- rocksdb 9.0.0 fails to build on GCC 13.2.1 with `-march=x86-64-v3`
- Cache Dump all keys without filter
- checkpoint directory is empty when db is empty HOT 2
- [Java] In read-only mode can't get data from blob only if there is just one checkpoint with one entry HOT 11
- Solution to the periodic slowdown of GetUpdatesSnce
- Heading typo on wiki docs: PlainTable Format HOT 1
- does rocksdb provide any monitoring metrics? HOT 1
- Java release for 9.1 HOT 2
- segFault while write large data on multiple thread HOT 3
- Feature request: rate limit compaction triggered by periodic compaction seconds/ ttl only HOT 5
- The value of 'micros/op' is not equal to 1,000,000 divided by the value of 'ops/sec' HOT 4
- Question about CompactRange behavior with option atomic_flush=true
- Segfault During compaction using FIFO Compaction style for a single CF
- Safer shutdown behaviour by deafult HOT 2
- StdLogger truncating last letter in some cases HOT 1
- High Memory Usage/ LRU cache size is not being respected HOT 1
- rocksdb abnormal exit
- Feature request: log to stderr logger + LOG file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocksdb.