kirklund commented on a change in pull request #6835:
URL: https://github.com/apache/geode/pull/6835#discussion_r702190141
##########
File path:
geode-core/src/main/java/org/apache/geode/cache/client/internal/AuthenticateUserOp.java
##########
@@ -87,31 +101,13 @@ private AuthenticateUserOp() {
}
static class AuthenticateUserOpImpl extends AbstractOp {
-
+ private static Logger logger = LogService.getLogger();
Review comment:
This should probably be `final`.
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
##########
@@ -216,11 +216,14 @@
*/
boolean keepalive = false;
+ /**
+ * for snigle user environment
Review comment:
`snigle`? :D
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
##########
@@ -1537,12 +1531,18 @@ protected void deliverMessage(Conflatable conflatable) {
_statistics.incMessagesReceived();
- // post process
- if (securityService.needPostProcess()) {
- Object oldValue = clientMessage.getValue();
- Object newValue =
securityService.postProcess(clientMessage.getRegionName(),
- clientMessage.getKeyOfInterest(), oldValue,
clientMessage.valueIsObject());
- clientMessage.setLatestValue(newValue);
+ // post process for single-user mode. We don't do post process for
multi-user mode
+ if (subject != null) {
+ ThreadState state = securityService.bindSubject(subject);
+ if (securityService.needPostProcess()) {
+ Object oldValue = clientMessage.getValue();
+ Object newValue =
securityService.postProcess(clientMessage.getRegionName(),
+ clientMessage.getKeyOfInterest(), oldValue,
clientMessage.valueIsObject());
+ clientMessage.setLatestValue(newValue);
+ }
+ if (state != null) {
+ state.clear();
+ }
Review comment:
This should probably be done in a try-finally:
```
ThreadState state = securityService.bindSubject(subject);
try {
// do work
} finally {
if (state != null) {
state.clear();
}
}
```
--
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]