You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/08/09 11:55:58 UTC
[GitHub] [zeppelin] Reamer commented on a change in pull request #4186: [ZEPPELIN-5468]Fast return when invalid ticket of no session case
Reamer commented on a change in pull request #4186:
URL: https://github.com/apache/zeppelin/pull/4186#discussion_r685128717
##########
File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
##########
@@ -263,19 +263,17 @@ public void onMessage(NotebookSocket conn, String msg) {
}
TicketContainer.Entry ticketEntry = TicketContainer.instance.getTicketEntry(receivedMessage.principal);
- if (ticketEntry != null &&
- (!ticketEntry.getTicket().equals(receivedMessage.ticket))) {
+ if (ticketEntry == null || StringUtils.isEmpty(ticketEntry.getTicket())) {
+ LOG.debug("{} message: invalid ticket {}", receivedMessage.op, receivedMessage.ticket);
+ return;
+ } else if (!ticketEntry.getTicket().equals(receivedMessage.ticket)) {
/* not to pollute logs, log instead of exception */
if (StringUtils.isEmpty(receivedMessage.ticket)) {
- LOG.debug("{} message: invalid ticket {} != {}", receivedMessage.op,
- receivedMessage.ticket, ticketEntry.getTicket());
- } else {
- if (!receivedMessage.op.equals(OP.PING)) {
- conn.send(serializeMessage(new Message(OP.SESSION_LOGOUT).put("info",
- "Your ticket is invalid possibly due to server restart. "
- + "Please login again.")));
- }
+ LOG.debug("{} message: invalid ticket {} != {}", receivedMessage.op, receivedMessage.ticket, ticketEntry.getTicket());
Review comment:
`receivedMessage.ticket` is empty or null at this time. I think that this message makes no sense.
--
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: dev-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org