[
https://issues.apache.org/jira/browse/STORM-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327287#comment-15327287
]
ASF GitHub Bot commented on STORM-1886:
---------------------------------------
Github user arunmahadevan commented on a diff in the pull request:
https://github.com/apache/storm/pull/1470#discussion_r66785037
--- Diff:
external/storm-redis/src/main/java/org/apache/storm/redis/state/RedisKeyValueState.java
---
@@ -163,15 +190,20 @@ public void prepareCommit(long txid) {
LOG.debug("Prepared txn already exists, will merge", txid);
pendingPrepare.putAll(pendingCommit);
}
- if (!pendingPrepare.isEmpty()) {
+ if (!pendingPrepare.isEmpty() ||
!pendingDeletePrepare.isEmpty()) {
commands.hmset(prepareNamespace, pendingPrepare);
+ commands.hdel(prepareNamespace,
pendingDeletePrepare.toArray(new String[pendingDeletePrepare.size()]));
--- End diff --
Shouldn't you save the pendingDeletePrepare keys separately into a redis
hashset. If a previously saved key (only in redis) is deleted, this may not
work.
> Extend KeyValueState interface with delete method
> -------------------------------------------------
>
> Key: STORM-1886
> URL: https://issues.apache.org/jira/browse/STORM-1886
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Balazs Kossovics
>
> Even if the implementation of checkpointing only uses the get/put methods of
> the KeyValueState interface, the existance of a delete method could be really
> useful in the general case.
> I made a first implementation, what do you think about?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)