Dan Berindei created ISPN-12638:
-----------------------------------
Summary: Make NonBlockingStore.delete() return CompletionStage<Void>
Key: ISPN-12638
URL:
https://issues.redhat.com/browse/ISPN-12638
Project: Infinispan
Issue Type: Enhancement
Components: API, Loaders and Stores
Affects Versions: 12.0.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
{{NonBlockingStore.delete(int segment, Object key)}} returns a
{{CompletionStage<Boolean>}}, just like {{CacheWriter.delete(Object key)}} returns a
{{boolean}}. But the {{Boolean}} return value is not used, so it could be replaced with
{{Void}}.
In {{CacheWriterInterceptor}}, the return value of the remove command is based only on the
value that was loaded in the invocation context, not on the result of the store delete
operation:
https://github.com/infinispan/infinispan/blob/7206596b4a0258d0b8f1a20d782...
Same with the {{removeHits}} statistic in {{CacheMgmtInterceptor}}:
https://github.com/infinispan/infinispan/blob/2d53d0a1e59f2dc3335235f9daf...
Changing the return value to {{CompletionStage<Void>}} would improve performance in
some stores, e.g. {{RocksDBStore}} wouldn't have to read the value first. And the
async store can't return the result of the actual deletion anyway.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)