Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Conversation

@hasancelik
Copy link

New metadata/group type introduced to define partition group based on Kubernetes node that Hazelcast cluster runs on. The discovery plugin should pass name of the node to the core SPI via using discoverLocalMetadata method like zone info. This method passes both zone and node name metadata. User can not enable two group types at the same time so cluster will decide which metadata will be used based on cluster config:

    hazelcast:
      partition-group:
        enabled: true
        group-type: NODE_AWARE

Here is the related PRD.

(cherry-picked from commit 9f70794)
forward-port of #278

* Add NODE_AWARE metadata support

With 3.12.11 IMDG release, new metadata introduced to define partition group
based on Kubernetes node that Hazelcast cluster runs on.The discovery plugin
should pass name of the node to the core SPI via using discoverLocalMetadata method
like zone info. This method passes both zone and node name metadata. User can not
enable tow group types at the same time so cluster will decide which metadata
will be used based on cluster config.
@hasancelik hasancelik added this to the 2.2.1 milestone Dec 1, 2020
@hasancelik hasancelik requested a review from leszko December 1, 2020 13:06
@hasancelik hasancelik requested a review from a team as a code owner December 1, 2020 13:06
@hasancelik hasancelik requested review from alparslanavci and removed request for a team and alparslanavci December 1, 2020 13:06
pom.xml Outdated
<findbugs.annotations.version>3.0.1u2</findbugs.annotations.version>

<hazelcast.version>4.1</hazelcast.version>
<hazelcast.version>4.1.1-SNAPSHOT</hazelcast.version>
Copy link

Choose a reason for hiding this comment

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

Again, do we need the snapshot here?

Copy link
Author

Choose a reason for hiding this comment

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

Using constant does not feel right actually 🙂 we do not need to concern about backward compatibility at master branch, right? Also we have released plugin with IMDG snapshot dependency before:
https://github.com/hazelcast/hazelcast-kubernetes/blob/v2.1/pom.xml#L42

Putting constant again and release 2.2.1 with 4.1 dependency is ok for me as well btw. After IMDG 4.1.1 release, we can upgrade IMDG dependency to 4.1.1 and start use PartitionGroupMetaData.PARTITION_GROUP_NODE.

Copy link

Choose a reason for hiding this comment

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

I think we still should care about the backward-compatibility because not all users use hazelcast-all. Now, for example, if they use hazelcast:4.1 with hazelcast-kubernetes:2.2. And the see that hazelcast-kubernetes:2.2.1 was released, they may want to update. But it'll crash their app.

It's not actually about releasing from snapshot (because the dependency is provided), but about the code compatibility.

We don't always have to keep backward-compatibility and we describe compatibilities here, but this change is actually so small that I'd favor keeping backward compatibility than reusing this one constant.

Copy link
Author

Choose a reason for hiding this comment

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

I think we still should care about the backward-compatibility because not all users use hazelcast-all. Now, for example, if they use hazelcast:4.1 with hazelcast-kubernetes:2.2. And the see that hazelcast-kubernetes:2.2.1 was released, they may want to update. But it'll crash their app.

I see, I totally missed out this scenario. I have reverted last commit 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants