Github user mcgilman commented on a diff in the pull request:
https://github.com/apache/nifi/pull/454#discussion_r63874050
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-optimistic-locking/src/main/java/org/apache/nifi/web/revision/NaiveRevisionManager.java
---
@@ -423,7 +440,7 @@ public boolean requestWriteLock(final Revision
proposedRevision) throws ExpiredR
throw ise;
}
- if (stamp.getClientId() == null ||
stamp.getClientId().equals(proposedRevision.getClientId())) {
+ if (stamp.getUser() == null ||
stamp.getUser().equals(user)) {
--- End diff --
I think we need to be checking both the user and the client id here. To
protect against the case when the same user has multiple clients open (like
multiple browser windows). One client shouldn't be able to assume the
transaction from another client. Should also have a unit test for this scenario.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---