[
https://issues.apache.org/jira/browse/IGNITE-14198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17287013#comment-17287013
]
Alexey Scherbakov commented on IGNITE-14198:
--------------------------------------------
[~agura]
I have reviewed the patch and have some comments and questions:
1. MetaStorageService.revision() looks redundant. For which purposes the API
client is supposed to use it ?
2. java.util.concurrent.Future doesn't allow to asynchornously wait for it's
completion. Something like CompletableFuture should be used here,
but it exposes methods for completing the running future, leaving the async
operation in undetermined state.
3. Batch methods like getAll and putAll are missing.
4. Condition and Update must be final classes, otherwise user can pass it's own
implementation and break a contract.
5. We must have method for generic CAS, like:
Future<Entry> replace(Entry oldEntry, byte[] newVal)
(and batch version of it) for the cases not covered by existing Conditions.
To check if a CAS was successul:
Entry replaced = metastore.replace(oldEntry, newVal).get();
if (replaced == oldEntry) // CAS has failed.
...
6. Who and when should invoke MetaStorageService.compact() method ?
7. Splitting for commons and client modules doesn't seem to have benefits.
> Define interface for meta storage client
> ----------------------------------------
>
> Key: IGNITE-14198
> URL: https://issues.apache.org/jira/browse/IGNITE-14198
> Project: Ignite
> Issue Type: New Feature
> Reporter: Andrey N. Gura
> Assignee: Andrey N. Gura
> Priority: Major
> Labels: iep-61, ignite-3
> Fix For: 3.0.0-alpha2
>
>
> Interface for meta storage client should be defined in order to unblock
> development and unit-testing.
> Interface implementation is not needed on this stage.
> We need to crystallize the metastorage interface prototype from the IEP to
> understand how it will be integrated with other system components.
> Need to cover:
> * Asynchrony aspects
> * Possible error codes (connection failure -> unknown result vs Raft failure
> -> known result, etc)
> * Complex multi-updates (aka transactions)
> * Watchers. Each node can watch all updates and filter locally or adjust the
> watched ranges dynamically (consistency is important here)
> These interfaces are considered "client" interfaces as they will be available
> on all nodes in the cluster
--
This message was sent by Atlassian Jira
(v8.3.4#803005)