Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 0.24 for rolling upgrade to 0.25 #5389

Merged
merged 2 commits into from
Sep 23, 2020
Merged

Conversation

MiguelPires
Copy link
Contributor

Description

Prepares 0.24 for a rolling upgrade to 0.25. This version still uses the fallback strategy to try to deserialize bytes with the new serializer and fall back to the legacy one, in case of failure. However, it first checks the serialized object for a header with a version in order to avoid the slower fallback path in the common case. If the serialized object doesn't have a header, we know it was serialized by 0.24 or earlier.
One note about the structure of the byte header: since Kryo serializes integers with the least significant byte at the lowest address (little endian), we use a header with two bytes in which the first is the version number and the second is a magic byte (0xFF). For a valid registration to conflict with this header, we'd have to register a class with the id 65281 and greater, which is unlikely.

Related issues

closes #5104

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement

Copy link
Contributor

@deepthidevaki deepthidevaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Some minor comments. Did you run a benchmark with this version?

private final NamespaceImpl namespace;

FallbackNamespace(final NamespaceImpl fallback, final NamespaceImpl namespace) {
this.fallback = fallback;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name fallback is a bit misleading as it uses fallback as default for serializing. Can we give more meaningful names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These names were requested by the reviewer in the last review #5042 (comment). The initial names were legacy and compatible. Can you suggest alternatives that are more meaningful?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it make sense to use "fallback" in 0.25 because it is actually using it as a fallback. But here fallback is the default. legacy and compatible sounds good to me. Or just switch the places - current namespace is the new fallback.

@MiguelPires
Copy link
Contributor Author

Thanks for the review. Yes, the benchmark has been running under the mp-spike namespace for a few days (last 24h average is 150 wfe/s)

@MiguelPires
Copy link
Contributor Author

Thanks for the feedback @deepthidevaki. The latest commit changes the namespace names to compatible and legacy

Copy link
Contributor

@deepthidevaki deepthidevaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@MiguelPires
Copy link
Contributor Author

bors r+

@zeebe-bors
Copy link
Contributor

zeebe-bors bot commented Sep 23, 2020

Build succeeded:

@zeebe-bors zeebe-bors bot merged commit c77b6fc into stable/0.24 Sep 23, 2020
@zeebe-bors zeebe-bors bot deleted the 5104-rolling branch September 23, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants