batch33 task4 implement group C cluster stream features

This commit is contained in:
Joseph Doherty
2026-02-28 22:58:12 -05:00
parent fee37d88bf
commit 9ef04cc28a
4 changed files with 406 additions and 0 deletions

View File

@@ -9,4 +9,30 @@ public sealed partial class NatsServer
return Math.Max(1, config.Replicas);
}
internal void SendStreamLostQuorumAdvisory(Account? account, string stream, string[]? peers = null)
{
_ = account;
_ = peers;
Noticef("JetStream stream lost quorum advisory for stream {0}", stream);
}
internal void SendStreamLeaderElectAdvisory(Account? account, string stream, string leader)
{
_ = account;
Noticef("JetStream stream leader elect advisory for stream {0}, leader {1}", stream, leader);
}
internal bool RemoveStream(Account? account, string streamName)
{
if (account == null)
return false;
var (stream, _) = account.LookupStream(streamName);
if (stream == null)
return false;
stream.Delete();
return true;
}
}