[ https://issues.apache.org/jira/browse/STORM-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346650#comment-15346650 ]
ASF GitHub Bot commented on STORM-1886: --------------------------------------- Github user kosii commented on a diff in the pull request: https://github.com/apache/storm/pull/1470#discussion_r68260812 --- Diff: storm-core/src/jvm/org/apache/storm/state/KeyValueState.java --- @@ -45,4 +45,11 @@ * @return the value or defaultValue if no mapping is found */ V get(K key, V defaultValue); + + /** + * Deletes the value mapped to the key, if there is any + * + * @param key the key + */ + void delete(K key); --- End diff -- It was my initial idea, but in case of the Redis implementation it needs and extra database request , as the key might not currently in one of the `pending*` structures. Does the overhead of the extra query looks negligible to you? > 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)