Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #1156] change "UnkonwnState" to "UnknownState" #1172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/producer/transaction/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (dl *DemoListener) ExecuteLocalTransaction(msg *primitive.Message) primitiv
dl.localTrans.Store(msg.TransactionId, primitive.LocalTransactionState(status+1))

fmt.Printf("dl")
return primitive.UnkonwnState
return primitive.UnknownState
}

func (dl *DemoListener) CheckLocalTransaction(msg *primitive.MessageExt) primitive.LocalTransactionState {
Expand All @@ -69,7 +69,7 @@ func (dl *DemoListener) CheckLocalTransaction(msg *primitive.MessageExt) primiti
return primitive.RollbackMessageState
case 3:
fmt.Printf("checkLocalTransaction unknown: %v\n", msg)
return primitive.UnkonwnState
return primitive.UnknownState
default:
fmt.Printf("checkLocalTransaction default COMMIT_MESSAGE: %v\n", msg)
return primitive.CommitMessageState
Expand Down
2 changes: 1 addition & 1 deletion primitive/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ type LocalTransactionState int
const (
CommitMessageState LocalTransactionState = iota + 1
RollbackMessageState
UnkonwnState
UnknownState
)

type TransactionListener interface {
Expand Down
4 changes: 2 additions & 2 deletions producer/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ func (tp *transactionProducer) SendMessageInTransaction(ctx context.Context, msg
if err != nil {
return nil, err
}
localTransactionState := primitive.UnkonwnState
localTransactionState := primitive.UnknownState
switch rsp.Status {
case primitive.SendOK:
if len(rsp.TransactionID) > 0 {
Expand Down Expand Up @@ -785,7 +785,7 @@ func (tp *transactionProducer) transactionState(state primitive.LocalTransaction
return primitive.TransactionCommitType
case primitive.RollbackMessageState:
return primitive.TransactionRollbackType
case primitive.UnkonwnState:
case primitive.UnknownState:
return primitive.TransactionNotType
default:
return primitive.TransactionNotType
Expand Down
Loading