Skip to content
Merged
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
8 changes: 7 additions & 1 deletion Lite/Services/RemoteCollectorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,18 @@ protected static long GenerateCollectionId()

/// <summary>
/// Gets the server name used for DuckDB storage and hashing.
/// Appends the database name for Azure SQL Database connections so that
/// different databases on the same logical server get distinct server_ids.
/// Appends ":RO" for ReadOnlyIntent connections so they get a
/// different server_id than read-write connections to the same host.
/// </summary>
internal static string GetServerNameForStorage(ServerConnection server)
{
return server.ReadOnlyIntent ? server.ServerName + ":RO" : server.ServerName;
var name = string.IsNullOrWhiteSpace(server.DatabaseName)
? server.ServerName
: server.ServerName + ":" + server.DatabaseName;

return server.ReadOnlyIntent ? name + ":RO" : name;
}

/// <summary>
Expand Down