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

PT-2298 pt-galera-log-explainer superfluous lines on conflicts #746

Closed
wants to merge 54 commits into from
Closed

PT-2298 pt-galera-log-explainer superfluous lines on conflicts #746

wants to merge 54 commits into from

Conversation

ylacancellera
Copy link
Contributor

It actually was the broken example on blog post's draft.

  • The contributed code is licensed under GPL v2.0
  • Contributor Licence Agreement (CLA) is signed
  • Test suite update

ylacancellera and others added 30 commits November 7, 2023 18:08
…gression test

When adding "ownip", it was also propagating the new IP to the old hash.
But with operators, when IP where changing hash will also change, so
linking the new IP to old hash is anachronic. It is not wrong, but
depending on the order of map merges, the newest information could have
been overriden depending on the order of events.

That situation was producing X(2*number of conflicts) versions of output for operators, with
different md5sum, which could produce false-positive regression tests

So currently some information are not linked anymore, so some IPs are
not translated even though they could, but it is a limitation of using
maps as source of truth, as they are not versioned
It must test multiple times to remove doubts.
As the tool is reading files and relying on maps, their access order are
random. It can impact some translations
It existed for non-operator setup, but was not working for operators due
to k8s logs not interpreting newlines and tabs
This operator version re-uses existing regular regex handlers directly
It was using maps in each context, which would be merged between
contexts, then injected each time we needed a message to display.

It had a limitation on complicated operator setups: historical
information would be overriden by newer associations.
(e.g, that IP was for node0 yesterday, now it's node1, so associations
have been overwritten and incorrect)

It also introduced complexity, such as forcing to define closures too
many times, merging maps, it would be harder to debug, and every files
were starting from empty translation maps.
Moreover, iterating on maps is guaranteed to be random so it could create
hard-to-debug output variations on complex cases.

Now it is a singleton in translate package, still using maps but now it
associates an array of "units" storing the timestamp with each piece of information.
It is protected by rwmutex, because map are not threadsafe. (there's no
parallel processing for now)

No regressions, and it passes "operator_ambiguous_ips_list_all_no_color"
where the old system failed.
It nows also can be used as an easy to read source of information in
itself
Can be used to break the tool, and I actually never had an use-case
- Commented out whois command in README.rst
- Copied README.rst into docs directory, so user manual will include
  this tool
- Sync README.rst and docs/pt-galera-log-explainer.rst
- Added exception for IST into .typos.toml
- Added exception into .typos.toml for src/go/pt-galera-log-explainer/tests/
- Added exception for Go tests into .typos.toml
- Exceptions for identifiers and Galera library errors in .typos.toml
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](rs/zerolog@v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.9 to 0.6.0.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](google/go-cmp@v0.5.9...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
svetasmirnova and others added 24 commits December 4, 2023 13:10
…_testcase

Follow PR-429 unstop option with testcase
PT-2277 - fix pt-visual-explain for 'Impossible ON condition' case
…/google/go-cmp-0.6.0

Bump github.com/google/go-cmp from 0.5.9 to 0.6.0
…/rs/zerolog-1.31.0

Bump github.com/rs/zerolog from 1.30.0 to 1.31.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.16.0.
- [Commits](golang/crypto@v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…/x/crypto-0.16.0

Bump golang.org/x/crypto from 0.15.0 to 0.16.0
- Changed logic, introduced by commit 1d1c13f
- Added test case
- Changed logic, introduced by commit 1d1c13f
- Added test case
…r_id 0

- Better check if server_id is defined
- Added test case
Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](aquasecurity/trivy-action@0.14.0...0.16.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…s/setup-go-5

Bump actions/setup-go from 4 to 5
…curity/trivy-action-0.16.0

Bump aquasecurity/trivy-action from 0.14.0 to 0.16.0
….org/mongo-driver-1.13.1

Bump go.mongodb.org/mongo-driver from 1.13.0 to 1.13.1
…tion_is_not_working_for_MySQL8.0

PT-2083 - Pt-archiver --charset option is not working for MySQL8.0
…3.5.5_breaks_on_mysql5.7_with_server_id_0

PT-2268 - pt-online-schema-change 3.5.5 breaks on mysql5.7 with serve…
Added hook for help output for new option in src/go/Makefile: build
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