You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (Jira)" <ji...@apache.org> on 2023/06/15 19:56:00 UTC
[jira] [Updated] (NIFI-11595) StateProvider.replace() cannot create the initial state
[ https://issues.apache.org/jira/browse/NIFI-11595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Burgess updated NIFI-11595:
--------------------------------
Fix Version/s: 1.latest
2.latest
> StateProvider.replace() cannot create the initial state
> -------------------------------------------------------
>
> Key: NIFI-11595
> URL: https://issues.apache.org/jira/browse/NIFI-11595
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Peter Turcsanyi
> Assignee: Peter Turcsanyi
> Priority: Major
> Fix For: 1.latest, 2.latest
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{StateProvider.replace()}} method properly works when the state already exists and persisted in the storage. However, it cannot create the state at first run.
> As a workaround, {{setState()}} needs to be used but it does not provide the same compare-and-swap mechanism as {{replace()}} so it is the caller responsibility to handle concurrency.
> To lift this responsibility from the clients and also to provide a more consistent API, {{replace()}} should support creating the initial state. It should be able to move the state "from nothing to X" not only "from X1 to X2" and also providing the same compare-and-swap logic.
> Affected {{StateProvider}} implementations:
> - {{ZooKeeperStateProvider}}
> - {{RedisStateProvider}}
> - {{KubernetesConfigMapStateProvider}}
> - {{WriteAheadLocalStateProvider}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)