Skip to content

chore: remove aliases#658

Open
karenc-bq wants to merge 3 commits into
dev/v3from
chore/remove-aliases
Open

chore: remove aliases#658
karenc-bq wants to merge 3 commits into
dev/v3from
chore/remove-aliases

Conversation

@karenc-bq

@karenc-bq karenc-bq commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove aliases from HostInfo, use identifyConnection to fetch unique instance id instead.
  • Update workflow job versions
  • Port over fixes for aurora connection tracker plugin, ensure tracked connections are properly drained

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq requested a review from a team as a code owner June 16, 2026 05:44
@karenc-bq karenc-bq force-pushed the chore/remove-aliases branch from 7b13101 to 414b0e5 Compare June 16, 2026 05:49
@karenc-bq karenc-bq changed the title Chore/remove aliases chore: remove aliases Jun 16, 2026
Comment thread common/lib/plugin_service.ts
Comment on lines +109 to +111
identifyConnection(targetClient: ClientWrapper, connectionHostInfo: HostInfo | null): Promise<HostInfo | null>;

identifyConnection(targetClient: ClientWrapper, connectionHostInfo?: HostInfo | null): Promise<HostInfo | null>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think any of the plugin service implementations implement these? They only have the original version. The wrapper needs this one for the added value of host_id_cache_service

Comment thread common/lib/plugins/limitless/limitless_connection_context.ts
private _isInTransaction: boolean = false;
private servicesContainer: FullServicesContainer;
protected hosts: HostInfo[] = [];
protected routedHostInfo: HostInfo | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's set this to null to start - otherwise it is undefined

Comment thread mysql/lib/client.ts
}
await this.pluginService.setCurrentClient(result, result.hostInfo);
const connectedHostInfo: HostInfo | null = this.pluginService.getRoutedHostInfo() ?? this.pluginService.getInitialConnectionHostInfo();
await this.pluginService.setCurrentClient(result, connectedHostInfo);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we might need a null check for host info as I think setCurrentClient needs a non-null host info - same thing in pg client

if (monitorContext.isHostUnhealthy) {
const monitoringHostInfo = await this.getMonitoringHostInfo();
if (monitoringHostInfo) {
this.pluginService.setAvailability(monitoringHostInfo.allAliases, HostAvailability.NOT_AVAILABLE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this supposed to be removed?

key,
queue.filter((connWeakRef: WeakRef<ClientWrapper>) => connWeakRef?.deref() ?? null)
);
for (const connectionList of OpenedConnectionTracker.openedConnections.values()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we also remove keys in this list that have an empty queue?

Comment on lines +49 to +54
if (hostInfo.hostId) {
lastHost = this.trackConnection(hostInfo.hostId, client);
}
if (hostInfo.hostAndPort) {
lastHost = this.trackConnection(hostInfo.hostAndPort, client);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this can add something to be tracked twice, are there any issues if we invalidate the connection twice in invalidateAllConnections?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants