8000 Rephrase log when committed TX not in local mempool + make it debug by sergio-mena · Pull Request #738 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rephrase log when committed TX not in local mempool + make it debug #738

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

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

sergio-mena
Copy link
Contributor
@sergio-mena sergio-mena commented Apr 20, 2023

Closes #737

If the execution hits the log line changed in this PR, it doesn't mean there is an error condition.
A TX included in a block does not need to be present in the local mempool of a nodes at the time it is processing the new block.
As the info is still useful, we re-word the message and turn it into a Debug log


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

@sergio-mena sergio-mena requested a review from a team as a code owner April 20, 2023 15:42
@sergio-mena sergio-mena self-assigned this Apr 20, 2023
@sergio-mena sergio-mena added the backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x label Apr 20, 2023
@@ -612,7 +612,7 @@ func (mem *CListMempool) Update(
// 100
// https://github.com/tendermint/tendermint/issues/3322.
if err := mem.RemoveTxByKey(tx.Key()); err != nil {
mem.logger.Error("Committed transaction could not be removed from mempool", "key", tx.Key(), err.Error())
mem.logger.Debug("Committed transaction not in local mempool (not an error)", "key", tx.Key(), err.Error())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Something that was missing in the previous PR, and that we can fix here, is to add a tag before err.Error(). For example: "error", err.Error(), or some other name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted! Fixed it

@mergify mergify bot merged commit 6498d67 into main Apr 24, 2023
@mergify mergify bot deleted the sergio/737-fix-error-mempool branch April 24, 2023 10:55
mergify bot pushed a commit that referenced this pull request Apr 24, 2023
…738)

Closes #737

If the execution hits the log line changed in this PR, it doesn't mean there is an error condition.
A TX included in a block does not need to be present in the local mempool of a nodes at the time it is processing the new block.
As the info is still useful, we re-word the message and turn it into a Debug log

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments

(cherry picked from commit 6498d67)
sergio-mena added a commit that referenced this pull request Apr 24, 2023
…738) (#749)

Closes #737

If the execution hits the log line changed in this PR, it doesn't mean there is an error condition.
A TX included in a block does not need to be present in the local mempool of a nodes at the time it is processing the new block.
As the info is still useful, we re-word the message and turn it into a Debug log

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments

(cherry picked from commit 6498d67)

Co-authored-by: Sergio Mena <sergio@informal.systems>
thanethomson pushed a commit that referenced this pull request May 6, 2023
…738)

Closes #737

If the execution hits the log line changed in this PR, it doesn't mean there is an error condition.
A TX included in a block does not need to be present in the local mempool of a nodes at the time it is processing the new block.
As the info is still useful, we re-word the message and turn it into a Debug log

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Error message "Committed transaction could not be removed from mempool" should be debug and reworded
2 participants
0