Fix METADAPT-A deadlock when closing transaction

This commit is contained in:
Sasha Koshka 2025-01-28 16:11:23 -05:00
parent 4647f91abe
commit 4daccca66a

View File

@ -104,7 +104,7 @@ func (this *a) receive() {
this.transLock.Lock()
defer this.transLock.Unlock()
for _, trans := range this.transMap {
trans.Close()
trans.closeDontUnlist()
}
clear(this.transMap)
}()
@ -163,9 +163,13 @@ type transA struct {
}
func (this *transA) Close() error {
this.incoming.Close()
err := this.closeDontUnlist()
this.parent.unlistTransactionSafe(this.ID())
return nil
return err
}
func (this *transA) closeDontUnlist() error {
return this.incoming.Close()
}
func (this *transA) ID() int64 {