Xuanwo opened a new pull request, #9101:
URL: https://github.com/apache/opendal/pull/9101

   # Which issue does this PR close?
   
   Closes #9084. #9085 addressed the other local-path services.
   
   # Rationale for this change
   
   A non-local hostname in a RocksDB URI could silently direct writes to a 
local directory. FoundationDB could silently connect using a local cluster 
file, or select its default cluster when the URI had no path.
   
   # What changes are included in this PR?
   
   Validate the hostname when deriving RocksDB's `datadir` from the URI path 
and when resolving FoundationDB's `config_path` from the URI or its default. 
Report `ConfigInvalid` with the offending host. Add focused tests for host 
validation and explicit path options.
   
   # Are there any user-facing changes?
   
   Use `rocksdb:///path` or `foundationdb:///path` for a local path. Both 
services also accept `localhost` case-insensitively. An explicit `datadir` or 
`config_path` still takes precedence over the URI. A host-only RocksDB URI 
without `datadir` continues to report the missing directory. FoundationDB 
rejects a host-only non-local URI unless `config_path` is explicit.
   
   On Linux with RocksDB 10.4.2, the original URI created a local database 
whose contents could be reopened via a hostless URI. The revised URI parser 
rejected the same input before it created the directory. With two isolated 
FoundationDB 7.3.69 instances, `fdbcli` confirmed writes to the path-selected 
and default clusters on the original implementation. The revised parser 
rejected both non-local URIs, and neither cluster contained the test keys. 
Hostless, `localhost`, and explicit-path controls selected the expected 
locations.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - pi, Sol (xhigh) reproduced the placement errors, implemented the checks, 
and tested against RocksDB and FoundationDB.
   - pi, Astra (high) coordinated the investigation and verified the candidate 
against the current base.
   - pi, SWE-2 (high) independently reviewed the patch, URI precedence rules, 
and real-service evidence.
   - pi, Gemini (high) drafted the PR description.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to