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 ElementInstanceState to reduce garbage creation #1691

Closed
Zelldon opened this issue Nov 21, 2018 · 0 comments · Fixed by #1798
Closed

Refactor ElementInstanceState to reduce garbage creation #1691

Zelldon opened this issue Nov 21, 2018 · 0 comments · Fixed by #1798
Assignees
Labels
kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog

Comments

@Zelldon
Copy link
Member

Zelldon commented Nov 21, 2018

For example getTokenEvent or getTokenEvents creates each time new instances, also other methods like storeToken etc.

depends on #1195

@Zelldon Zelldon self-assigned this Nov 21, 2018
@menski menski added Status: Planned kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. and removed planned kind/feature Categorizes an issue or PR as a feature, i.e. new behavior labels Dec 11, 2018
ghost pushed a commit that referenced this issue Dec 19, 2018
1798: New Zeebe DB abstraction layer r=Zelldon a=Zelldon

## New Abstraction layer:
 * add new abstraction layer called Zeebe DB
 * add impl of abstraction for RocksDB
 * with new abstraction layer should be possible to support also other implementations

## Migration:
* logstream uses new Zeebe db abstraction layer
* StreamProcessor creation is done via new StreamProcessorFactory, which have to be putted on the StreamProcessorBuilder
 * StateController usage was removed - StateSnapshotController does now the magic (open/close db and doing checkpoints) 
 * Snapshot controller is used to open the database, after that the StreamPrcoessor  is created with StreamProcessorFactory and the created ZeebeDB. This means stream processor will always be in a valid state where the DB/State is open (shorter lifecycle then the database)
 * StreamProcessor will be closed on `onActorCloseRequested`. In `onActorClosing` a snapshot will be created and the DB will be closed.
* All states are no longer state controllers. They have to be created with an open ZeebeDB
* They can use the new abstraction layer to store key-value pairs and operate on column familes
* Column families are defined via an enum, this makes it possible to detect duplicates on compilation time
 * If column families are created the keys and values have to be defined -> this ensures that only valid values can be stored (this gives also type safety).

closes #1742
closes #1195 
closes #1691
closes #1799

Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
@ghost ghost closed this as completed in #1798 Dec 19, 2018
@ghost ghost removed the Status: Needs Review label Dec 19, 2018
ghost pushed a commit that referenced this issue Sep 27, 2019
3119: chore(deps-dev): bump testcontainers from 1.11.3 to 1.12.1 r=Zelldon a=dependabot-preview[bot]

Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.11.3 to 1.12.1.
<details>
<summary>Release notes</summary>

*Sourced from [testcontainers's releases](https://github.com/testcontainers/testcontainers-java/releases).*

> ## 1.12.1
> # What's Changed
> 
> ## 🚀 Features
> 
> * Use "copy" strategy in `withClasspathResourceMapping` where appropriate ([#1814](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1814)) [@&#8203;bsideup](https://github.com/bsideup)
> * Speed up listening port detection by running the checks as a single command ([#1782](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1782)) [@&#8203;bsideup](https://github.com/bsideup)
> * RabbitMQ: Support legacy RabbitMQ configuration format ([#1692](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1692)) [@&#8203;twillouer](https://github.com/twillouer)
> * Separate "environment" and "classpath" properties (for global things) ([#1784](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1784)) [@&#8203;bsideup](https://github.com/bsideup)
> * Add check for compatible Docker OS type, to fail gracefully if Docker daemon does not support Linux containers ([#1780](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1780)) [@&#8203;casz](https://github.com/casz)
> 
> 
> ## 🐛 Bug Fixes
> 
> * Fix credentials when using a helper that returns a token ([#1734](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1734)) [@&#8203;rszewczyk](https://github.com/rszewczyk)
> * Reinstate retries for image pulls ([#1712](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1712)) [@&#8203;rnorth](https://github.com/rnorth)
> * Amend container shutdown to catch and log for all Exception classes ([#1663](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1663)) [@&#8203;rnorth](https://github.com/rnorth)
> * Coordinate image removals after stopping containers ([#1745](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1745)) [@&#8203;aguibert](https://github.com/aguibert)
> * RabbitMQ: fix typo in binding command ([#1792](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1792)) [@&#8203;glefloch](https://github.com/glefloch)
> * Fix Deprecated MySQL Class Name warnings ([#1760](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1760)) [@&#8203;turackangal](https://github.com/turackangal)
> * Exclude jna transitive dependency from visible-assertions to reconcile versions ([#1744](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1744)) [@&#8203;eggilbert](https://github.com/eggilbert)
> 
> ## 📖 Documentation
> 
> * Fix Javadoc error ([#1812](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1812), [#1813](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1813)) [@&#8203;rnorth](https://github.com/rnorth)
> * update latest version with 1.12.0 ([#1800](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1800)) [@&#8203;ryukato](https://github.com/ryukato)
> * Add docker-compose.yml to simplify local doc development ([#1653](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1653)) [@&#8203;mikesir87](https://github.com/mikesir87)
> * Update copyright notices ([#1691](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1691)) [@&#8203;twillouer](https://github.com/twillouer)
> * Add networking documentation ([#1651](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1651)) [@&#8203;mikesir87](https://github.com/mikesir87)
> * Add Micronaut Data to who is using ([#1717](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1717)) [@&#8203;graemerocher](https://github.com/graemerocher)
> * Add a basic documentation page for RabbitMQ module ([#1661](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1661)) [@&#8203;rnorth](https://github.com/rnorth)
> * Add link to DB2 module docs, and add incubating note to page ([#1660](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1660)) [@&#8203;rnorth](https://github.com/rnorth)
> 
> ## 🧹 Housekeeping
> 
> <details>
>  <summary>Click to expand...</summary>
> 
> * Add test to demonstrate fix for [#1452](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1452) (loss of whitespace in sp… ([#1702](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1702)) [@&#8203;rnorth](https://github.com/rnorth)
> * Add more labels to the Stale bot's config ([#1810](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1810)) [@&#8203;bsideup](https://github.com/bsideup)
> * Disable Travis for all but master branch builds ([#1720](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1720)) [@&#8203;rnorth](https://github.com/rnorth)
> * Add docker-compose.yml to simplify local doc development ([#1653](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1653)) [@&#8203;mikesir87](https://github.com/mikesir87)
> * Add Maven Central as a fallback for dependency download ([#1710](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1710)) [@&#8203;rnorth](https://github.com/rnorth)
> * Fix fixed host port test ([#1355](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1355)) [@&#8203;glebsts](https://github.com/glebsts)
> * Mark toxiproxy tests as flaky pending further analysis ([#1772](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1772)) [@&#8203;rnorth](https://github.com/rnorth)
> * JUnit rule for flaky test retry ([#1680](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1680)) [@&#8203;rnorth](https://github.com/rnorth)
> 
> </details>
> 
> ## 📦 Dependency updates
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`b35f2ca`](testcontainers/testcontainers-java@b35f2ca) Update .travis.yml to ensure that tag builds are performed
- [`b1cb06d`](testcontainers/testcontainers-java@b1cb06d) Add test to demonstrate fix for [#1452](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1452) (loss of whitespace in sp… ([#1702](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1702))
- [`4fbef4b`](testcontainers/testcontainers-java@4fbef4b) Fix javadoc error ([#1832](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1832))
- [`386c545`](testcontainers/testcontainers-java@386c545) Bump org.springframework.boot in /examples ([#1831](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1831))
- [`1161b1b`](testcontainers/testcontainers-java@1161b1b) Bump aws-java-sdk-sqs from 1.11.625 to 1.11.626 in /modules/localstack ([#1830](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1830))
- [`1e6ac9b`](testcontainers/testcontainers-java@1e6ac9b) Fix error in Javadocs and run javadoc generation during 'check' ([#1813](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1813))
- [`acd8bdc`](testcontainers/testcontainers-java@acd8bdc) Bump aws-java-sdk-sqs from 1.11.624 to 1.11.625 in /modules/localstack ([#1829](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1829))
- [`0d8b42b`](testcontainers/testcontainers-java@0d8b42b) Bump pulsar-client from 2.4.0 to 2.4.1 in /modules/pulsar ([#1825](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1825))
- [`33beb8d`](testcontainers/testcontainers-java@33beb8d) Bump aws-java-sdk-sqs from 1.11.623 to 1.11.624 in /modules/localstack ([#1826](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1826))
- [`0ce6305`](testcontainers/testcontainers-java@0ce6305) Bump neo4j from 3.5.8 to 3.5.9 in /modules/neo4j ([#1823](https://github-redirect.dependabot.com/testcontainers/testcontainers-java/issues/1823))
- Additional commits viewable in [compare view](testcontainers/testcontainers-java@1.11.3...1.12.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=org.testcontainers:testcontainers&package-manager=maven&previous-version=1.11.3&new-version=1.12.1)](https://dependabot.com/compatibility-score.html?dependency-name=org.testcontainers:testcontainers&package-manager=maven&previous-version=1.11.3&new-version=1.12.1)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants