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

Multi tenant configuration - fix handling of group management topics tenant - #849

Closed
eolivelli wants to merge 11 commits into
streamnative:masterfrom
eolivelli:fix/multi-tenant-group-management
Closed

Multi tenant configuration - fix handling of group management topics tenant#849
eolivelli wants to merge 11 commits into
streamnative:masterfrom
eolivelli:fix/multi-tenant-group-management

Conversation

@eolivelli

Copy link
Copy Markdown
Contributor

OffsetConfig was still using "public" as tenant

Changes:

  • change "public/default/__consumer_offsets" to "${tenant}/default/__consumer_offsets"
  • pass the 'tenant' when we used that configuration
  • update a test case

@CLAassistant

CLAassistant commented Oct 25, 2021

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Demogorgon314 Demogorgon314 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall LGTM. Just left few comment. PTAL.

@@ -1154,6 +1158,7 @@ public void removeGroupsForPartition(int offsetsPartition,
TopicPartition topicPartition = new TopicPartition(
GROUP_METADATA_TOPIC_NAME, offsetsPartition

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this topic name need change too, it will make log more accurate.

@Default
private String offsetsTopicName = DefaultOffsetsTopicName;

public String getCurrentOffsetsTopicName(String tenant) {

@Demogorgon314 Demogorgon314 Oct 26, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO, We can replace placeholder when OffsetConfig object creating, Instead of replacing placeholder every time we get it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it makes sense to me.
But I have to perform some refactors.
I will update the patch in the next days

@eolivelli

Copy link
Copy Markdown
Contributor Author

After rebasing to current master this patch is useless.
I am closing this PR

@eolivelli eolivelli closed this Dec 1, 2021
@eolivelli
eolivelli deleted the fix/multi-tenant-group-management branch December 1, 2021 07:23
Demogorgon314 pushed a commit to Demogorgon314/kop that referenced this pull request Apr 15, 2026
…nabled (streamnative#850)

Fixes streamnative#849 
### Motivation

When Ursa is enabled, the `ManagedLedger` instance will never be closed so that it will always exist in the `ManagedLedgerFactory`'s internal map.

### Modifications

- Introduce the DelayedRemovalCache to support delay removal for the managed ledger for sometime. The `DelayedRemovalCache` is a thread-safe cache implementation that supports delayed removal of entries. It provides functionality to schedule the removal of cache entries after a specified delay, with the capability to cancel pending removals if the entry is accessed again before the delay expires. Additionally, it allows for a removal listener to be specified to perform actions when an entry is removed. Please see more design details in the java doc of `DelayedRemovalCache`.
- Use the DelayedRemovalCache to support closing the manager ledger after 1 min if it's not used by any connection.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants