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

/// <summary>
/// Gets the server name used for DuckDB storage and hashing.
/// Appends "/DatabaseName" when set so Azure SQL DB connections to different
/// databases on the same logical server get distinct server_ids (#677).
/// 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 = server.ServerName;

if (!string.IsNullOrWhiteSpace(server.DatabaseName))
name += "/" + server.DatabaseName;

if (server.ReadOnlyIntent)
name += ":RO";

return name;
}

/// <summary>
Expand Down
Loading