batch33 task4 implement group C cluster stream features
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user