Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4531: Add tests for snapshotting and compaction r=Zelldon a=Zelldon ## Description Improved further the `RaftRule` such that we are able to trigger snapshotting, which will create snapshots on all nodes. After the snapshot is taken the snapshot listeners are called, which trigger compaction. This setup reflects now how our system works, but it is much easier to test I think. Normally we do a snapshot on the Leader and replicate that. The snapshot replication call at the end also `SnapshotStore#newSnapshot`. With the current test approach we were able to simplify that approach and test the same behavior. I added a test for: * normal snapshot taking and verify that all nodes have this snapshot * snapshotting triggers compaction verify log is compacted * snapshot is send on rejoin cluster I plan to add further tests, more complex ones probably. I checked #4467 and the problem was that the node was not able to truncate his log because it was at zero index and the leader was not able to send a snapshot, because it had none. The test was wrongly written I would say. <!-- Please explain the changes you made here. --> ## Related issues <!-- Which issues are closed by this PR or are related --> closes #4467 # 4582: chore(deps): update version.sbe to v1.18.1 r=npepinpe a=renovate[bot] This PR contains the following updates: | Package | Update | Change | |---|---|---| | [uk.co.real-logic:sbe-tool](https://togithub.com/real-logic/simple-binary-encoding) | minor | `1.17.0` -> `1.18.1` | | [uk.co.real-logic:sbe-all](https://togithub.com/real-logic/simple-binary-encoding) | minor | `1.17.0` -> `1.18.1` | --- ### Release Notes <details> <summary>real-logic/simple-binary-encoding</summary> ### [`v1.18.1`](https://togithub.com/real-logic/simple-binary-encoding/releases/1.18.1) [Compare Source](https://togithub.com/real-logic/simple-binary-encoding/compare/1.18.0...1.18.1) - Fix case of importing buffers when var data is used in nested groups for Java codecs. Java binaries can be found [here...](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22uk.co.real-logic%22%20sbe) ### [`v1.18.0`](https://togithub.com/real-logic/simple-binary-encoding/releases/1.18.0) [Compare Source](https://togithub.com/real-logic/simple-binary-encoding/compare/1.17.0...1.18.0) - Only generate imports for Java codecs when required to address warnings. - Access fixed length arrays as Spans in C# codecs. [PR #​780](https://togithub.com/real-logic/simple-binary-encoding/pull/780). - Add `SbeSchemaId` and `SbeSchemaVersion` as constants in fixed flyweights for C# codecs. - Generate source docs from schema descriptions for C# codecs. [PR #​778](https://togithub.com/real-logic/simple-binary-encoding/pull/778). - Add offset and wrap methods to C# codecs for ease of use. [PR #​777](https://togithub.com/real-logic/simple-binary-encoding/pull/777). - Support non-standard message headers form the C++ codecs. [PR #​775](https://togithub.com/real-logic/simple-binary-encoding/pull/775). - Fix version support for enums in C codecs. [Issue #​773](https://togithub.com/real-logic/simple-binary-encoding/issues/773). - Improve formatting of generated C codecs. - Require a strict dependency on Agrona. - Upgrade to Agrona 1.5.0. - Upgrade to javadoc-links 5.1.0. - Upgrade to JUnit 5.6.2. - Upgrade to Gradle 6.4.1. Java binaries can be found [here...](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22uk.co.real-logic%22%20sbe) </details> --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#zeebe-io/zeebe). Co-authored-by: Christopher Zell <zelldon91@googlemail.com> Co-authored-by: Renovate Bot <bot@renovateapp.com>
- Loading branch information