You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/08/24 21:29:29 UTC
[GitHub] [bookkeeper] mauricebarnum commented on a change in pull request #2775: [STATESTORE] support an optional time to live (TTL) on a per table basis
mauricebarnum commented on a change in pull request #2775:
URL: https://github.com/apache/bookkeeper/pull/2775#discussion_r695230428
##########
File path: stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/service/RangeStoreServiceImpl.java
##########
@@ -128,10 +140,31 @@
this.rootRange = failRequestStorageContainer;
this.mgStore = failRequestStorageContainer;
this.storeFactory = storeFactory;
+ this.clientManager = clientManager;
this.rrStoreFactory = rrStoreFactory;
this.mrStoreFactory = mrStoreFactory;
this.tableStoreFactory = tableStoreFactory;
this.tableStoreCache = new TableStoreCache(storeFactory, tableStoreFactory);
+ this.streamProperties = new ConcurrentHashMap<Long, StreamProperties>();
+ }
+
+ private CompletableFuture<StreamProperties> getStreamProperties(long streamId) {
+ final StreamProperties p = streamProperties.get(streamId);
+ if (p != null) {
+ return FutureUtils.value(p);
+ }
+
+ return clientManager.getStreamProperties(streamId)
Review comment:
RootRange reads from local storage. The getStreamProps service call fails in the base impl. I tried that first. :)
I'll delete the cache. CHM would protect against corrupting the internals bit potentially overwrite one reference with another equivalent one. Since I didn't avoid concurrent RPC due to the unlikelihood once we get to the put it's hard to care.
--
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: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org