saimanojsuper commented on code in PR #40398:
URL: https://github.com/apache/beam/pull/40398#discussion_r4177880199
##########
runners/spark/src/main/java/org/apache/beam/runners/spark/stateful/SparkStateInternals.java:
##########
@@ -537,7 +541,11 @@ public ReadableState<Boolean> addIfAbsent(InputT input) {
public void remove(InputT input) {
Set<InputT> sparkSetState = readAsSet();
sparkSetState.remove(input);
- writeValue(sparkSetState);
+ if (sparkSetState.isEmpty()) {
Review Comment:
nit: redundancy of the code can be improved using Collection Generic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]