Unexpected message id from client --> adapt exception message?

Hi,

The fixes done in 24.7 towards a stable resynchronisation protocol (GitHub · Where software is built) greatly reduced the number of times we are seeing the unexpected message id from client error in the logs. Fantastic work, thank you.

However, it still appears every now and then. In the exception message it says that we should enable DEBUG log, but would it not make sense to just log the messageDetails in the exception directly? Or would it cause too much data sent to the logs? Enabling debug for ServerRpcHandler causes several other things to be logged that are not related and confuse things. I’ld rather not go by default with that category enabled in production.

            } else {
                /*
                 * If the reason for ending up here is intermittent, then we
                 * should just issue a full resync since we cannot know the
                 * state of the client engine.
                 *
                 * There are reasons to believe that there are deterministic
                 * issues that trigger this condition, and we'd like to collect
                 * more data to uncover anything such before actually
                 * implementing the resync that would thus hide most symptoms of
                 * the actual root cause bugs.
                 */
                String messageDetails = getMessageDetails(rpcRequest);
                getLogger().debug("Unexpected message id from the client."
                        + " Expected client id: " + expectedId + ", got "
                        + requestId + ". Message start: " + messageDetails);
                throw new UnsupportedOperationException(
                        "Unexpected message id from the client."
                                + " Expected client id: " + expectedId
                                + ", got " + requestId
                                + ". more details logged on DEBUG level.");
            }

I guess there’s less reason to keep those for the debug logging level now when there’s fewer of them overall. I created Increase log level of the remaining sync id mismatches · Issue #21377 · vaadin/flow · GitHub to consider changing the log level. Thanks for the suggestion!

1 Like