[jira] [Updated] (IGNITE-17883) Remove the invoke method from KeyValurView and RecordView interfaces

2023-05-18 Thread Vyacheslav Koptilin (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-17883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-17883:
-
Ignite Flags:   (was: Docs Required,Release Notes Required)

> Remove the invoke method from KeyValurView and RecordView interfaces
> 
>
> Key: IGNITE-17883
> URL: https://issues.apache.org/jira/browse/IGNITE-17883
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta1
>Reporter: Vyacheslav Koptilin
>Priority: Major
>  Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> _KeyValueView_ and _RecordView_ provide the following methods:
> {code:java}
> /**
>  * Executes invoke processor code against the value associated with the 
> provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Result of the processing.
>  * @see InvokeProcessor
>  */
>  R invoke(@Nullable Transaction tx, @NotNull K key, 
> InvokeProcessor proc, Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against the value associated 
> with the provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture invokeAsync(
> @Nullable Transaction tx,
> @NotNull K key,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Executes invoke processor code against values associated with the provided 
> keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Results of the processing.
>  * @see InvokeProcessor
>  */
>  Map invokeAll(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against values associated 
> with the provided keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture> invokeAllAsync(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
>  {code}
> The main problem with these methods assume that the user defined closure - 
> _InvokeProcessor_ must be idempotent. This is a consequence of the 
> limitations of the replication protocol. However, the implementation does not 
> have the right way to check this requirement. For example, a simple closure 
> that increments a value for a key could lead to data inconsistency under some 
> circumstances.
> For now, _IgniteCompute.executeColocated_ can be used in order to handle 
> these needs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-17883) Remove the invoke method from KeyValurView and RecordView interfaces

2022-10-17 Thread Vyacheslav Koptilin (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-17883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-17883:
-
Fix Version/s: 3.0.0-beta2
   (was: 3.0.0-beta1)

> Remove the invoke method from KeyValurView and RecordView interfaces
> 
>
> Key: IGNITE-17883
> URL: https://issues.apache.org/jira/browse/IGNITE-17883
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta1
>Reporter: Vyacheslav Koptilin
>Priority: Major
>  Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> _KeyValueView_ and _RecordView_ provide the following methods:
> {code:java}
> /**
>  * Executes invoke processor code against the value associated with the 
> provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Result of the processing.
>  * @see InvokeProcessor
>  */
>  R invoke(@Nullable Transaction tx, @NotNull K key, 
> InvokeProcessor proc, Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against the value associated 
> with the provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture invokeAsync(
> @Nullable Transaction tx,
> @NotNull K key,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Executes invoke processor code against values associated with the provided 
> keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Results of the processing.
>  * @see InvokeProcessor
>  */
>  Map invokeAll(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against values associated 
> with the provided keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture> invokeAllAsync(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
>  {code}
> The main problem with these methods assume that the user defined closure - 
> _InvokeProcessor_ must be idempotent. This is a consequence of the 
> limitations of the replication protocol. However, the implementation does not 
> have the right way to check this requirement. For example, a simple closure 
> that increments a value for a key could lead to data inconsistency under some 
> circumstances.
> For now, _IgniteCompute.executeColocated_ can be used in order to handle 
> these needs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-17883) Remove the invoke method from KeyValurView and RecordView interfaces

2022-10-12 Thread Vyacheslav Koptilin (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-17883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-17883:
-
Fix Version/s: 3.0.0-alpha6

> Remove the invoke method from KeyValurView and RecordView interfaces
> 
>
> Key: IGNITE-17883
> URL: https://issues.apache.org/jira/browse/IGNITE-17883
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha6
>Reporter: Vyacheslav Koptilin
>Priority: Major
>  Labels: ignite-3
> Fix For: 3.0.0-alpha6
>
>
> _KeyValueView_ and _RecordView_ provide the following methods:
> {code:java}
> /**
>  * Executes invoke processor code against the value associated with the 
> provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Result of the processing.
>  * @see InvokeProcessor
>  */
>  R invoke(@Nullable Transaction tx, @NotNull K key, 
> InvokeProcessor proc, Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against the value associated 
> with the provided key.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param key A key associated with the value that invoke processor will be 
> applied to. The key cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @param  Invoke processor result type.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture invokeAsync(
> @Nullable Transaction tx,
> @NotNull K key,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Executes invoke processor code against values associated with the provided 
> keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Results of the processing.
>  * @see InvokeProcessor
>  */
>  Map invokeAll(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
> /**
>  * Asynchronously executes invoke processor code against values associated 
> with the provided keys.
>  *
>  * @param tx The transaction or {@code null} to auto commit.
>  * @param  Invoke processor result type.
>  * @param keys Ordered collection of keys which values associated with should 
> be processed. The keys cannot be {@code null}.
>  * @param proc An invocation processor.
>  * @param args Optional invoke processor arguments.
>  * @return Future representing pending completion of the operation.
>  * @see InvokeProcessor
>  */
> @NotNull  CompletableFuture> invokeAllAsync(
> @Nullable Transaction tx,
> @NotNull Collection keys,
> InvokeProcessor proc,
> Serializable... args);
>  {code}
> The main problem with these methods assume that the user defined closure - 
> _InvokeProcessor_ must be idempotent. This is a consequence of the 
> limitations of the replication protocol. However, the implementation does not 
> have the right way to check this requirement. For example, a simple closure 
> that increments a value for a key could lead to data inconsistency under some 
> circumstances.
> For now, _IgniteCompute.executeColocated_ can be used in order to handle 
> these needs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)