lib/model: Use a single lock (phase two: cleanup) (#9276)
Cleanup after #9275. This renames `fmut` -> `mut`, removes the deadlock detector and associated plumbing, renames some things from `...PRLocked` to `...RLocked` and similar, and updates comments. Apart from the removal of the deadlock detection machinery, no functional code changes... i.e. almost 100% diff noise, have fun reviewing.
This commit is contained in:
@@ -54,12 +54,11 @@ const (
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
AuditWriter io.Writer
|
||||
DeadlockTimeoutS int
|
||||
NoUpgrade bool
|
||||
ProfilerAddr string
|
||||
ResetDeltaIdxs bool
|
||||
Verbose bool
|
||||
AuditWriter io.Writer
|
||||
NoUpgrade bool
|
||||
ProfilerAddr string
|
||||
ResetDeltaIdxs bool
|
||||
Verbose bool
|
||||
// null duration means use default value
|
||||
DBRecheckInterval time.Duration
|
||||
DBIndirectGCInterval time.Duration
|
||||
@@ -251,12 +250,6 @@ func (a *App) startup() error {
|
||||
keyGen := protocol.NewKeyGenerator()
|
||||
m := model.NewModel(a.cfg, a.myID, a.ll, protectedFiles, a.evLogger, keyGen)
|
||||
|
||||
if a.opts.DeadlockTimeoutS > 0 {
|
||||
m.StartDeadlockDetector(time.Duration(a.opts.DeadlockTimeoutS) * time.Second)
|
||||
} else if !build.IsRelease || build.IsBeta {
|
||||
m.StartDeadlockDetector(20 * time.Minute)
|
||||
}
|
||||
|
||||
a.mainService.Add(m)
|
||||
|
||||
// The TLS configuration is used for both the listening socket and outgoing
|
||||
|
||||
Reference in New Issue
Block a user