Skip to content

Commit 5205723

Browse files
authored
Merge pull request #209 from jovi-Li/main
回滚事件写入了错误类型
2 parents 9ab58fc + 2141d1c commit 5205723

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Vertex.Transaction/Actor/DTxActor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ await this.TxEventStorage.Append(new EventDocument<TPrimaryKey>
205205

206206
protected override async ValueTask OnTxRollback(string txId)
207207
{
208-
if (!string.IsNullOrEmpty(txId) && this.EventTypeContainer.TryGet(typeof(TxFinishedEvent), out var eventName))
208+
if (!string.IsNullOrEmpty(txId) && this.EventTypeContainer.TryGet(typeof(TxRollbackEvent), out var eventName))
209209
{
210210
var rollbackEvent = new EventUnit<TPrimaryKey>
211211
{
@@ -217,7 +217,7 @@ await this.TxEventStorage.Append(new EventDocument<TPrimaryKey>
217217
{
218218
FlowId = txId,
219219
ActorId = this.ActorId,
220-
Data = this.Serializer.Serialize(rollbackEvent.Event as TxFinishedEvent),
220+
Data = this.Serializer.Serialize(rollbackEvent.Event as TxRollbackEvent),
221221
Name = eventName,
222222
Timestamp = rollbackEvent.Meta.Timestamp,
223223
Version = rollbackEvent.Meta.Version,

0 commit comments

Comments
 (0)