tustvold commented on code in PR #3713:
URL: https://github.com/apache/arrow-rs/pull/3713#discussion_r1104938409
##########
object_store/src/memory.rs:
##########
@@ -195,14 +203,19 @@ impl ObjectStore for InMemory {
// response. Otherwise, we just collect the common prefixes.
let mut objects = vec![];
for (k, v) in self.storage.read().range((prefix)..) {
+ if !k.as_ref().starts_with(prefix.as_ref()) {
+ break;
+ }
+
let mut parts = match k.prefix_match(prefix) {
Some(parts) => parts,
- None => break,
Review Comment:
This logic was just wrong, as it could cause it to bail out early if the
store contained any paths less than the prefix that didn't match. This is now
caught by the additional tests in list_uses_directories_correctly
--
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]