Skip to content

Commit

Permalink
[type:bugfix] fix sync all error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aias00 committed Nov 9, 2024
1 parent ab87238 commit 57da344
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ public void onMessage(final String message, final Session session) {
if (Objects.equals(message, DataEventTypeEnum.MYSELF.name())) {
try {
ThreadLocalUtils.put(SESSION_KEY, session);
SpringBeanUtils.getInstance().getBean(SyncDataService.class).syncAll(DataEventTypeEnum.MYSELF);
String namespaceId = getNamespaceId(session);
SpringBeanUtils.getInstance().getBean(SyncDataService.class).syncAllByNamespaceId(DataEventTypeEnum.MYSELF, namespaceId);
} finally {
ThreadLocalUtils.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
p.plugin_jar AS pluginJar
FROM namespace_plugin_rel npr
LEFT JOIN plugin p ON p.id = npr.plugin_id
WHERE npr.namespace_id = #{namespaceId, jdbcType=VARCHAR}
ORDER BY
sort,
npr.id ASC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public ShenyuWebsocketClient(final URI serverUri, final Map<String, String> head
final String namespaceId) {
super(serverUri, headers);
this.namespaceId = namespaceId;
LOG.info("shenyu bootstrap websocket namespaceId:{}", namespaceId);
LOG.info("shenyu bootstrap websocket namespaceId: {}", namespaceId);
this.addHeader(Constants.SHENYU_NAMESPACE_ID, namespaceId);
this.websocketDataHandler = new WebsocketDataHandler(pluginDataSubscriber, metaDataSubscribers, authDataSubscribers, proxySelectorDataSubscribers, discoveryUpstreamDataSubscribers);
this.timer = WheelTimerFactory.getSharedTimer();
Expand Down

0 comments on commit 57da344

Please sign in to comment.