Closed Dragonliu2018 closed 3 hours ago
This PR reminds me the possibility of adding mget
support in opendal.
This PR reminds me the possibility of adding
mget
support in opendal.
@Xuanwo Can OpenDAL consider adding mget
? With OpenDAL, we can simplify the code.
@Xuanwo Can OpenDAL consider adding
mget
? With OpenDAL, we can simplify the code.
Not in the near future. We can revisit this part later :heart:
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Previous Impl: For the Column type, loop through the Column and get the values from Redis one by one via OpenDAL.
Current Impl: OpenDAL only supports fetching one value at a time, so we use redis client to fetch the data in batches (via
mget
).We also try to add a cache for performance optimization. The LRU cache is used first, and the performance is shown in the table below. However, the performance is not stable. Performance is good if the required data is cached, but poor if it is not or if the cache is full. In addition, we need to handle stale data in the cache to avoid wasting memory. So the TTL cache is tried, but the performance is worse than the LRU cache. So we temporarily give up on using cache for optimization. Related code: https://github.com/databendlabs/databend/pull/16882
Reproduce:
part of #16550
Tests
Type of change
This change isโ