jbertram commented on PR #5079: URL: https://github.com/apache/activemq-artemis/pull/5079#issuecomment-2229156489
> I find it awkward to reconcile the encoding having changed, with there being no consideration needed at all in terms of upgrade behaviour. The _main_ thing that changed here is the calculation of the encoding size, a calculation which isn't performed during the decoding process. The only actual encoding change was to fix a bug where encoding & decoding were using mismatched methods. Encoding was using `writeString` and decoding was using `readNullableString`. Technically speaking, this could have been fixed by changing the decoding to using `readString`, but that would have had implications for compatibility. Instead I changed the encoding to use `writeNullableString` which means that the data in the buffer is correct now and there should be no compatibility issues. > By 'continue to work as it always had', do you for example mean 'continue to behave incorrectly, until only data generated by new brokers exists'? If you have an old broker sending broken data to a new broker the new broker will choke on it. I don't see a reasonable way to avoid that. To clarify, are you saying that this fact needs to be documented? > ...if the calculated size has changed...couldnt that have similar effect during the access of old persisted data with the wrong encoded size by a newer broker? The encoding size is calculated and written to disk (or wire) along with the record. The new calculation won't come into play when reading this old data. The new broker will read the data from disk just like the old broker did since there's been no changes to decoding. -- 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: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact