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

refactor: Fixes the go race tests #158

Merged
merged 1 commit into from
Mar 27, 2022
Merged

Conversation

ValarDragon
Copy link
Member

We used these iterators with no mutex, back when iterator performance was
one of our main blockers, and this step was thought to be of heavy performance impact.

(It does add a notable delay to iteration steps, but it was later learned
the bulk of the problem was due to IAVL & LevelDB interaction)

Its overdue to have turned this off just for simplicity of tests passing.
We still should update the BTree library and remove the need for this
multiple process terrible hack that exists now, but thats work for the future.
(There is no race condition if you look into the details of whats happening,
the gorace detector is off here!)

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

We used these iterators with no mutex, back when iterator performance was
one of our main blockers, and this step was thought to be of heavy performance impact.

(It does add a notable delay to iteration steps, but it was later learned
the bulk of the problem was due to IAVL & LevelDB interaction)

Its overdue to have turned this off just for simplicity of tests passing.
We still should update the BTree library and remove the need for this
multiple process terrible hack that exists now, but thats work for the future.
(There is no race condition if you look into the details of whats happening,
the gorace detector is off here!)
Copy link

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM

@alexanderbez alexanderbez changed the title Fixes the go race tests. refactor: Fixes the go race tests Mar 26, 2022
@alexanderbez
Copy link

@ValarDragon what's up with the failing tests? Are they related?

@ValarDragon
Copy link
Member Author

IDK whats going on with the build failures. test-race (00) seems like a different race condition. CC @p0mvn for that one

@p0mvn
Copy link
Member

p0mvn commented Mar 27, 2022

I think this has to do with -race tests being slower than regular and, as a result, timing out. The test passes on my local machine without a timeout. So it might just mean that we need to find the right timeout value for the CI host machine.

We can tweak the timeout value here:

snapshotTimeout := 1 * time.Minute

Feel free to merge this PR, I can find the right value for the timeout in a separate PR

Update: created issue to keep track of this

@alexanderbez
Copy link

@Mergifyio backport v0.45.0x-osmo-v8

mergify bot pushed a commit that referenced this pull request Apr 15, 2022
We used these iterators with no mutex, back when iterator performance was
one of our main blockers, and this step was thought to be of heavy performance impact.

(It does add a notable delay to iteration steps, but it was later learned
the bulk of the problem was due to IAVL & LevelDB interaction)

Its overdue to have turned this off just for simplicity of tests passing.
We still should update the BTree library and remove the need for this
multiple process terrible hack that exists now, but thats work for the future.
(There is no race condition if you look into the details of whats happening,
the gorace detector is off here!)

(cherry picked from commit bd83477)
@mergify
Copy link

mergify bot commented Apr 15, 2022

backport v0.45.0x-osmo-v8

✅ Backports have been created

ValarDragon added a commit that referenced this pull request Apr 15, 2022
We used these iterators with no mutex, back when iterator performance was
one of our main blockers, and this step was thought to be of heavy performance impact.

(It does add a notable delay to iteration steps, but it was later learned
the bulk of the problem was due to IAVL & LevelDB interaction)

Its overdue to have turned this off just for simplicity of tests passing.
We still should update the BTree library and remove the need for this
multiple process terrible hack that exists now, but thats work for the future.
(There is no race condition if you look into the details of whats happening,
the gorace detector is off here!)

(cherry picked from commit bd83477)

Co-authored-by: Dev Ojha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants