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

Remove CacheEvictedSubscriber #34230

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.exception.core.external.sql.type.wrapper.SQLWrapperException;
import org.apache.shardingsphere.infra.spi.type.ordered.cache.OrderedServicesCache;
import org.apache.shardingsphere.metadata.persist.node.DatabaseMetaDataNode;
import org.apache.shardingsphere.mode.event.DataChangedEvent;
import org.apache.shardingsphere.mode.manager.ContextManager;
Expand All @@ -43,6 +44,7 @@ public void onChange(final DataChangedEvent event) {
if (!databaseName.isPresent()) {
return;
}
OrderedServicesCache.clearCache();
if (new MetaDataChangedHandler(contextManager).handle(databaseName.get(), event)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type;

import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.spi.type.ordered.cache.OrderedServicesCache;
import org.apache.shardingsphere.mode.event.DataChangedEvent;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.handler.DataChangedEventHandler;
Expand All @@ -36,6 +37,7 @@ public final class GlobalMetaDataChangedHandler implements DataChangedEventListe
@Override
public void onChange(final DataChangedEvent event) {
if (handler.getSubscribedTypes().contains(event.getType())) {
OrderedServicesCache.clearCache();
handler.handle(contextManager, event);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import lombok.Getter;
import org.apache.shardingsphere.infra.util.eventbus.EventSubscriber;
import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.CacheEvictedSubscriber;

import java.util.Collection;
import java.util.Collections;
Expand All @@ -33,6 +32,6 @@ public final class ClusterDispatchEventSubscriberRegistry {
private final Collection<EventSubscriber> subscribers;

public ClusterDispatchEventSubscriberRegistry() {
subscribers = Collections.singleton(new CacheEvictedSubscriber());
subscribers = Collections.emptyList();
}
}

This file was deleted.

This file was deleted.

Loading