Skip to content

Conversation

@hezhangjian
Copy link
Member

Motivation

This PR addresses the issue where RocksDB configurations fail to correctly resolve paths on Windows systems in the ServerConfiguration class. See windows daily build failed in https://github.com/apache/bookkeeper/actions/runs/9294883674

Note: Currently, windows is limited to some development jobs, there are still problems to be solved

Changes

  • Updated ServerConfiguration.java to utilize java.nio.file.Paths for path normalization and resolution.
  • Refactored the getDefaultRocksDBConf, getEntryLocationRocksdbConf, and getLedgerMetadataRocksdbConf methods to use a new method getFilePath.

Signed-off-by: ZhangJian He <shoothzj@gmail.com>
@hezhangjian hezhangjian added this to the 4.18.0 milestone May 30, 2024
@hezhangjian hezhangjian self-assigned this May 30, 2024
@dlg99
Copy link
Contributor

dlg99 commented May 30, 2024

I see

Error:  org.apache.bookkeeper.replication.BookieAutoRecoveryTest.testOpenLedgers -- Time elapsed: 120.0 s <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 120 seconds

I kicked CI retry but this test was stable IIRC.

@hezhangjian
Copy link
Member Author

@dlg99 I saw you open flaky test issues, I will take a look. I think we can approve this first. It solves error like this:

Error: Run 2: TestReadLastConfirmedAndEntry>BookKeeperClusterTestCase.setUp:169->BookKeeperClusterTestCase.setUp:194->BookKeeperClusterTestCase.startBKCluster:286->BookKeeperClusterTestCase.startNewBookie:658->BookKeeperClusterTestCase.startNewBookieAndReturnAddress:665->BookKeeperClusterTestCase.startAndAddBookie:676->BookKeeperClusterTestCase.startBookie:696 » InvalidPath Illegal char <:> at index 2: /D:/a/bookkeeper/bookkeeper/bookkeeper-server/target/test-classes/conf/ledger_metadata_rocksdb.conf

@dlg99
Copy link
Contributor

dlg99 commented May 31, 2024

I first noticed this test failing on this PR and later checked the others. LGTM, not broken by this change

@hezhangjian hezhangjian merged commit d7b2df4 into apache:master May 31, 2024
@hezhangjian hezhangjian deleted the fix-widnwos-rocksdb branch May 31, 2024 03:45
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
### Motivation

This PR addresses the issue where RocksDB configurations fail to correctly resolve paths on Windows systems in the `ServerConfiguration` class.

### Changes

- Updated `ServerConfiguration.java` to utilize `java.nio.file.Paths` for path normalization and resolution.
- Refactored the `getDefaultRocksDBConf`, `getEntryLocationRocksdbConf`, and `getLedgerMetadataRocksdbConf` methods to use a new method `getFilePath`.

Signed-off-by: ZhangJian He <shoothzj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants