From d1abeade35f19f6b1284a020b780f322178e00d7 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Mon, 7 Oct 2024 11:39:08 +0300 Subject: [PATCH 1/2] improove error text --- internal/topic/topicreadercommon/committer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/topic/topicreadercommon/committer.go b/internal/topic/topicreadercommon/committer.go index 428fe7df6..092046d73 100644 --- a/internal/topic/topicreadercommon/committer.go +++ b/internal/topic/topicreadercommon/committer.go @@ -19,7 +19,7 @@ import ( var ( ErrCommitDisabled = xerrors.Wrap(errors.New("ydb: commits disabled")) - ErrWrongCommitOrderInSyncMode = xerrors.Wrap(errors.New("ydb: wrong commit order in sync mode")) + ErrWrongCommitOrderInSyncMode = xerrors.Wrap(errors.New("ydb: wrong commit order in sync mode. It means you skipped committing some messages. Out-of-order commits are OK for async mode - you can commit the messages later. But im sync mode, it means deadlock: the code waits for a commit ack from the server, but the server waits for the commits of the skipped message. In sync mode, ensure that you commit messages/batches in the same order as you read them")) ) type SendMessageToServerFunc func(msg rawtopicreader.ClientMessage) error From f2b5a085393fc8af20ff554fe9c713d9a56559b6 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Mon, 7 Oct 2024 12:02:32 +0300 Subject: [PATCH 2/2] supress linter --- internal/topic/topicreadercommon/committer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/topic/topicreadercommon/committer.go b/internal/topic/topicreadercommon/committer.go index 092046d73..e27ab6d6e 100644 --- a/internal/topic/topicreadercommon/committer.go +++ b/internal/topic/topicreadercommon/committer.go @@ -19,7 +19,7 @@ import ( var ( ErrCommitDisabled = xerrors.Wrap(errors.New("ydb: commits disabled")) - ErrWrongCommitOrderInSyncMode = xerrors.Wrap(errors.New("ydb: wrong commit order in sync mode. It means you skipped committing some messages. Out-of-order commits are OK for async mode - you can commit the messages later. But im sync mode, it means deadlock: the code waits for a commit ack from the server, but the server waits for the commits of the skipped message. In sync mode, ensure that you commit messages/batches in the same order as you read them")) + ErrWrongCommitOrderInSyncMode = xerrors.Wrap(errors.New("ydb: wrong commit order in sync mode. It means you skipped committing some messages. Out-of-order commits are OK for async mode - you can commit the messages later. But im sync mode, it means deadlock: the code waits for a commit ack from the server, but the server waits for the commits of the skipped message. In sync mode, ensure that you commit messages/batches in the same order as you read them")) //nolint:lll ) type SendMessageToServerFunc func(msg rawtopicreader.ClientMessage) error