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

When using master branch to deploy latest RocksDB will encounter OptionsUtil.loadOptionsFromFile functions errors #1745

Open
HCKCh opened this issue Jan 18, 2025 · 1 comment

Comments

@HCKCh
Copy link

HCKCh commented Jan 18, 2025

I change the pom.xml by the following line:
<rocksdb.version>9.8.4</rocksdb.version>

I try to deploy the RocksDB with new pom file by the following command:
~/YCSB$ mvn -pl site.ycsb:rocksdb-binding -am clean package

It will show errors.

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/sailfish0814/YCSB/rocksdb/src/main/java/site/ycsb/db/rocksdb/RocksDBClient.java:[105,16] no suitable method found for loadOptionsFromFile(java.lang.String,org.rocksdb.Env,org.rocksdb.DBOptions,java.util.List<org.rocksdb.ColumnFamilyDescriptor>)
    method org.rocksdb.OptionsUtil.loadOptionsFromFile(org.rocksdb.ConfigOptions,java.lang.String,org.rocksdb.DBOptions,java.util.List<org.rocksdb.ColumnFamilyDescriptor>) is not applicable
      (argument mismatch; java.lang.String cannot be converted to org.rocksdb.ConfigOptions)
    method org.rocksdb.OptionsUtil.loadOptionsFromFile(long,java.lang.String,long,java.util.List<org.rocksdb.ColumnFamilyDescriptor>) is not applicable
      (argument mismatch; java.lang.String cannot be converted to long)
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for YCSB Root 0.18.0-SNAPSHOT:
[INFO] 
[INFO] YCSB Root .......................................... SUCCESS [  1.424 s]
[INFO] Core YCSB .......................................... SUCCESS [  7.301 s]
[INFO] Per Datastore Binding descriptor ................... SUCCESS [  0.173 s]
[INFO] YCSB Datastore Binding Parent ...................... SUCCESS [  0.464 s]
[INFO] RocksDB Java Binding ............................... FAILURE [  0.350 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.194 s
[INFO] Finished at: 2025-01-18T15:39:35Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project rocksdb-binding: Compilation failure
[ERROR] /home/sailfish0814/YCSB/rocksdb/src/main/java/site/ycsb/db/rocksdb/RocksDBClient.java:[105,16] no suitable method found for loadOptionsFromFile(java.lang.String,org.rocksdb.Env,org.rocksdb.DBOptions,java.util.List<org.rocksdb.ColumnFamilyDescriptor>)
[ERROR]     method org.rocksdb.OptionsUtil.loadOptionsFromFile(org.rocksdb.ConfigOptions,java.lang.String,org.rocksdb.DBOptions,java.util.List<org.rocksdb.ColumnFamilyDescriptor>) is not applicable
[ERROR]       (argument mismatch; java.lang.String cannot be converted to org.rocksdb.ConfigOptions)
[ERROR]     method org.rocksdb.OptionsUtil.loadOptionsFromFile(long,java.lang.String,long,java.util.List<org.rocksdb.ColumnFamilyDescriptor>) is not applicable
[ERROR]       (argument mismatch; java.lang.String cannot be converted to long)
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :rocksdb-binding

Is It induced by the version conflit of OptionsUtil.loadOptionsFromFile functions?
Or, I'm wrong for modifying the version of RocksDB only?
Does there have any plan/idea for this issue?

@HCKCh HCKCh changed the title When using master branch to deploy latest RocksDB will encounter issues When using master branch to deploy latest RocksDB will encounter OptionsUtil.loadOptionsFromFile functions errors Jan 19, 2025
@HCKCh
Copy link
Author

HCKCh commented Jan 22, 2025

Hi sir,
We found this issue comes from the loadOptionsFromFile/LoadLatestOptions function argument changes after RocksDB version 8.

Latest Version : loadOptionsFromFile
Early Version: loadOptionsFromFile

The same issue will also be encountered at

Latest Version: LoadLatestOptions()
Early Version: LoadLatestOptions()

The RocksDB version change will encounter this issue.
Its original arguments were [String dbPath, Env env, DBOptions dbOptions,
List cfDescs, boolean ignoreUnknownOptions
] but RocksDB change arguments into [final ConfigOptions configOptions,
final String optionsFileName, final DBOptions dbOptions,
final List cfDescs]

Currently, we modify these arguments of loadOptionsFromFile in RocksDBClient.java and LoadLatestOptions in RocksDBOptionsFileTest.java.
After we modify these changes, it can run latest RocksDB version(above 8.x) as well.

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

No branches or pull requests

1 participant