Skip to content

[#8379] fix(core): Handle duplicate PathContext keys by merging contexts with Sets#8414

Merged
jerryshao merged 2 commits intoapache:mainfrom
keepConcentration:8379
Sep 4, 2025
Merged

[#8379] fix(core): Handle duplicate PathContext keys by merging contexts with Sets#8414
jerryshao merged 2 commits intoapache:mainfrom
keepConcentration:8379

Conversation

@keepConcentration
Copy link
Contributor

What changes were proposed in this pull request?

This PR introduces a merge function to handle duplicate PathContext entries when building CredentialContext maps.

Why are the changes needed?

Without this fix, duplicate PathContext entries with the same credentialType would cause an IllegalStateException.

Fix: #8379

Does this PR introduce any user-facing change?

No user-facing changes.

How was this patch tested?

  1. Added unit tests with duplicate PathContext entries.
  2. Executed existing unit tests

@jerryshao jerryshao requested a review from FANNG1 September 3, 2025 09:44
@jerryshao jerryshao added the branch-1.0 Automatically cherry-pick commit to branch-1.0 label Sep 4, 2025
@jerryshao jerryshao merged commit 6ae4c7d into apache:main Sep 4, 2025
28 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 4, 2025
…xts with Sets (#8414)

### What changes were proposed in this pull request?

This PR introduces a merge function to handle duplicate `PathContext`
entries when building `CredentialContext` maps.

### Why are the changes needed?

Without this fix, duplicate `PathContext` entries with the same
`credentialType` would cause an `IllegalStateException`.

Fix: #8379

### Does this PR introduce _any_ user-facing change?

No user-facing changes.

### How was this patch tested?

  1. Added unit tests with duplicate `PathContext` entries.
  2. Executed existing unit tests

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Sep 15, 2025
… contexts with Sets (apache#8414)

### What changes were proposed in this pull request?

This PR introduces a merge function to handle duplicate `PathContext`
entries when building `CredentialContext` maps.

### Why are the changes needed?

Without this fix, duplicate `PathContext` entries with the same
`credentialType` would cause an `IllegalStateException`.

Fix: apache#8379

### Does this PR introduce _any_ user-facing change?

No user-facing changes.

### How was this patch tested?

  1. Added unit tests with duplicate `PathContext` entries.
  2. Executed existing unit tests

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
bharos pushed a commit to bharos/gravitino that referenced this pull request Oct 3, 2025
… contexts with Sets (apache#8414)

### What changes were proposed in this pull request?

This PR introduces a merge function to handle duplicate `PathContext`
entries when building `CredentialContext` maps.

### Why are the changes needed?

Without this fix, duplicate `PathContext` entries with the same
`credentialType` would cause an `IllegalStateException`.

Fix: apache#8379

### Does this PR introduce _any_ user-facing change?

No user-facing changes.

### How was this patch tested?

  1. Added unit tests with duplicate `PathContext` entries.
  2. Executed existing unit tests

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
bharos pushed a commit to bharos/gravitino that referenced this pull request Oct 7, 2025
… contexts with Sets (apache#8414)

### What changes were proposed in this pull request?

This PR introduces a merge function to handle duplicate `PathContext`
entries when building `CredentialContext` maps.

### Why are the changes needed?

Without this fix, duplicate `PathContext` entries with the same
`credentialType` would cause an `IllegalStateException`.

Fix: apache#8379

### Does this PR introduce _any_ user-facing change?

No user-facing changes.

### How was this patch tested?

  1. Added unit tests with duplicate `PathContext` entries.
  2. Executed existing unit tests

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-1.0 Automatically cherry-pick commit to branch-1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug report] Prevent java.lang.IllegalStateException: Duplicate key in CredentialOperationDispatcher.java

3 participants