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

Implement memlog store operations #19533

Merged
merged 3 commits into from
Jul 2, 2020
Merged

Conversation

urso
Copy link

@urso urso commented Jun 30, 2020

  • Enhancement

What does this PR do?

Implement store operation that get/set key value pairs from
the in-memory store, and log update operations.

This change also include unit tests and store compliance tests.

The addition of the statestore package is split up into multiple
changeset to ease review. The final version of the package can be found
here.

Once finalized, the libbeat/statestore package contains:

  • The statestore frontend and interface for use within Beats
  • Interfaces for the store backend
  • A common set of tests store backends need to support
  • a storetest package for testing new features that require a store. The
    testing helpers use map[string]interface{} that can be initialized or
    queried after the test run for validation purposes.
  • The default memlog backend + tests

Why is it important?

The statestore introduces a simple key-value store to Beats. The statestore will be used to replace the registry in filebeat in the future.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
    - [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

go test

Related issues

@urso urso added review libbeat needs_backport PR is waiting to be backported to other branches. Project:Filebeat-Input-v2 Team:Services (Deprecated) Label for the former Integrations-Services team v7.9.0 labels Jun 30, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 30, 2020
@@ -54,6 +54,9 @@ type Settings struct {
// Checkpoint predicate that can trigger a registry file rotation. If not
// configured, memlog will automatically trigger a checkpoint every 10MB.
Checkpoint CheckpointPredicate

// If set memlog will not check the version of the meta file.
IgnoreVersionCheck bool
Copy link
Author

Choose a reason for hiding this comment

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

This is currently required by the filebeat migration (PR not open yet). When migrating the old store we create a temporary store in the same directory and convert all entries before updating the meta-data file (migration supports 3 different formats, which made the process a little hairy).

go.mod Outdated
@@ -163,7 +163,7 @@ require (
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
golang.org/x/text v0.3.2
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632
golang.org/x/tools v0.0.0-20200630223951-c138986dd9b9
Copy link
Author

@urso urso Jun 30, 2020

Choose a reason for hiding this comment

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

yay, go modules and version pinning :/

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 1, 2020

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-07-02T09:27:44.560+0000

  • Duration: 127 min 52 sec

Test stats 🧪

Test Results
Failed 0
Passed 6115
Skipped 1017
Total 7132

Steps errors

Expand to view the steps failures

  • Name: Check out from version control

    • Description: [2020-07-02T09:30:00.517Z] using credential f6c7695a-671e-4f4f-a331-acdce44ff9ba
      [2020-07-02T09:30:

    • Duration: 2 min 16 sec

    • Start Time: 2020-07-02T09:29:55.333+0000

    • log

  • Name: Notifies GitHub of the status of a Pull Request

  • Name: Notifies GitHub of the status of a Pull Request

    • Description:

    • Duration: 20 min 8 sec

    • Start Time: 2020-07-02T11:12:52.034+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-02T11:33:33.921Z] + .ci/scripts/terraform-cleanup.sh x-pack/metricbeat
[2020-07-02T11:33:33.921Z] + DIRECTORY=x-pack/metricbeat
[2020-07-02T11:33:33.921Z] + FAILED=0
[2020-07-02T11:33:33.921Z] ++ find x-pack/metricbeat -name terraform.tfstate
[2020-07-02T11:33:33.921Z] + exit 0
[2020-07-02T11:33:34.295Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-02T11:33:34.553Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-02T11:33:34.554Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-02T11:33:34.554Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-02T11:33:35.040Z] Failed in branch Metricbeat x-pack
[2020-07-02T11:33:59.678Z] Body did not finish within grace period; terminating with extreme prejudice
[2020-07-02T11:34:00.292Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats
[2020-07-02T11:34:00.757Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-02T11:34:00.821Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Lint
[2020-07-02T11:34:01.548Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-07-02T11:34:02.070Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-02T11:34:02.453Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-02T11:34:02.830Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Dockerlogbeat
[2020-07-02T11:34:03.344Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Journalbeat-oss
[2020-07-02T11:34:04.549Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-07-02T11:34:05.058Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-07-02T11:34:05.679Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-07-02T11:34:06.278Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-02T11:34:07.475Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Heartbeat-oss
[2020-07-02T11:34:08.303Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-07-02T11:34:09.075Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-07-02T11:34:09.739Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Libbeat-x-pack
[2020-07-02T11:34:10.462Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-07-02T11:34:11.065Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-07-02T11:34:11.387Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-02T11:34:11.941Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-07-02T11:34:12.310Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Packetbeat-oss
[2020-07-02T11:34:12.533Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-02T11:34:12.826Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-02T11:34:13.166Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-02T11:34:13.357Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-07-02T11:34:13.569Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-Windows
[2020-07-02T11:34:13.786Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Filebeat-oss
[2020-07-02T11:34:13.985Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-07-02T11:34:14.210Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-07-02T11:34:14.355Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-07-02T11:34:14.571Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Libbeat-oss
[2020-07-02T11:34:14.739Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-07-02T11:34:14.871Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-07-02T11:34:15.034Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-02T11:34:15.463Z] + cat
[2020-07-02T11:34:15.463Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-02T11:34:15.463Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-02T11:34:22.127Z] runbld>>> runbld started
[2020-07-02T11:34:22.128Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-02T11:34:23.075Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19533' in order of occurrence in the config (last value wins).
[2020-07-02T11:34:24.479Z] runbld>>> Debug logging enabled.
[2020-07-02T11:34:24.479Z] runbld>>> Storing result
[2020-07-02T11:34:24.741Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-02T11:34:24.741Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200702113424-65410D52
[2020-07-02T11:34:24.741Z] runbld>>> Adding system facts.
[2020-07-02T11:34:25.688Z] runbld>>> Adding vcs info for the latest commit:  aa550777ce8baad84d20b4e8aa7b19887517c8db
[2020-07-02T11:34:25.688Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-02T11:34:25.688Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-02T11:34:25.688Z] Processing JUnit reports with runbld...
[2020-07-02T11:34:25.688Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-02T11:34:25.950Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-02T11:34:25.950Z] runbld>>> DURATION: 32ms
[2020-07-02T11:34:25.950Z] runbld>>> STDOUT: 40 bytes
[2020-07-02T11:34:25.950Z] runbld>>> STDERR: 49 bytes
[2020-07-02T11:34:25.950Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-02T11:34:25.950Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats
[2020-07-02T11:34:26.912Z] runbld>>> Storing build metadata: 
[2020-07-02T11:34:26.912Z] runbld>>> Adding test report.
[2020-07-02T11:34:26.912Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats
[2020-07-02T11:34:27.856Z] runbld>>> Found 72 test output files
[2020-07-02T11:34:28.433Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-07-02T11:34:28.433Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-07-02T11:34:29.388Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 6982 Skipped: 830
[2020-07-02T11:34:29.650Z] runbld>>> Storing result
[2020-07-02T11:34:29.650Z] runbld>>> FAILURES: 0
[2020-07-02T11:34:29.650Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-02T11:34:29.650Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200702113424-65410D52
[2020-07-02T11:34:29.910Z] runbld>>> Email notification disabled by environment variable.
[2020-07-02T11:34:29.910Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-02T11:34:35.638Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19533
[2020-07-02T11:34:35.755Z] [INFO] getVaultSecret: Getting secrets
[2020-07-02T11:34:35.854Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-02T11:34:36.766Z] + chmod 755 generate-build-data.sh
[2020-07-02T11:34:36.767Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19533/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19533/runs/6 ABORTED 7611885
[2020-07-02T11:34:36.767Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19533/runs/6/steps/?limit=10000 -o steps-info.json
[2020-07-02T11:34:39.994Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19533/runs/6/tests/?status=FAILED -o tests-errors.json

urso added 2 commits July 1, 2020 13:54
Implement store operation that get/set key value pairs from
the in-memory store, and log update operations.

This change also include unit tests and store compliance tests.

The addition of the statestore package is split up into multiple
changeset to ease review. The final version of the package can be found
[here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore).

Once finalized, the libbeat/statestore package contains:
- The statestore frontend and interface for use within Beats
- Interfaces for the store backend
- A common set of tests store backends need to support
- a storetest package for testing new features that require a store. The
  testing helpers use map[string]interface{} that can be initialized or
  queried after the test run for validation purposes.
- The default memlog backend + tests
@urso urso force-pushed the input-v2-memlog-op branch from 35303c0 to bca0ef6 Compare July 1, 2020 11:54
Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

Looks good, a couple typos and minor suggestions but nothing blocking. Approved.

@@ -110,7 +113,7 @@ func (r *Registry) Access(name string) (backend.Store, error) {
home := filepath.Join(r.settings.Root, name)
fileMode := r.settings.FileMode
bufSz := r.settings.BufferSize
store, err := openStore(logger, home, fileMode, bufSz, r.settings.Checkpoint)
store, err := openStore(logger, home, fileMode, bufSz, !r.settings.IgnoreVersionCheck, r.settings.Checkpoint)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for the parity flip between Settings and the function parameter? All else being equal I'd prefer if the parameter was ignoreVersionCheck also instead of mustCheckMeta (or at least that they were both the same)

Copy link
Author

Choose a reason for hiding this comment

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

Bad habits :)
Update to ignoreVersionCheck.

t.Fatal(err)
}

cases := list[:0]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand this construction -- this should be equivalent to cases := []os.FileInfo{}, right? Is this a type inference shortcut in the spirit of c++ auto, or something else?

Copy link
Author

Choose a reason for hiding this comment

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

this should be equivalent to cases := []os.FileInfo{}, right?

kinda. As we have slices the construct creates a slice of length 0, but with the old capacity.
It's an in-place filtering loop for removing files from the list (e.g. the Readme.md). See: https://github.com/golang/go/wiki/SliceTricks#filtering-without-allocating

But yeah, this is me being lazy :)

return nil, err
}
} else if !fi.Mode().IsDir() {
return nil, fmt.Errorf("'%v' is no directory", home)
Copy link
Contributor

Choose a reason for hiding this comment

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

grammar nit: "no" -> "not a"

// Error indicates the log file was incomplete or corrupted.
// Anyways, we already have the table in a valid state and will
// continue opening the store from here.
logp.Warn("Incomplete or corrupted log file in %v. Continue with last known complete and consistend state. Reason: %v", home, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "consistent"

@urso
Copy link
Author

urso commented Jul 2, 2020

Filebeat tests are all green. CI failed notifying github

@urso urso merged commit 6dd12f6 into elastic:master Jul 2, 2020
@urso urso deleted the input-v2-memlog-op branch July 2, 2020 12:42
v1v added a commit to v1v/beats that referenced this pull request Jul 3, 2020
…ne-beats

* upstream/master: (35 commits)
  [ci] fix env variable name for xpack filebeats (elastic#19617)
  Cache error responses for cloudfoundry apps metadata (elastic#19181)
  ci: user fixed type of agent (elastic#19625)
  Input v2 cursor testing (elastic#19573)
  Update Jenkinsfile to not inspect removed vendor (elastic#19610)
  Fix ordering and duplicate configs on autodiscover (elastic#19317)
  Prepare input/file for changes in the registrar (elastic#19516)
  Cursor input and manager implementation (elastic#19571)
  [Filebeat] Fix tls mapping in suricata module (elastic#19494)
  [Ingest Manager] Make Agent beta and Constraints experimental (elastic#19586)
  Accept prefix as metric_types for stackdriver metricset in GCP (elastic#19345)
  Implement memlog store operations (elastic#19533)
  introduce journalbeat/pkg in order to provide reusable shared code (elastic#19581)
  Add descriptions to HAProxy fields in Metricbeat (elastic#19561)
  ci: apm-server-update trigered only on upstream, comments, and manual triggered (elastic#19590)
  ci: enable upstream triggering on the packaging job (elastic#19589)
  ci: some jjbb improvements (elastic#19588)
  [MetricBeat] set tags correctly if the dimension value is ARN (elastic#19433)
  [Filebeat] Add default_fields: false to fields.yml in aws module (elastic#19568)
  Add publisher implementation for stateful inputs (elastic#19530)
  ...
urso pushed a commit to urso/beats that referenced this pull request Jul 7, 2020
Implement store operation that get/set key value pairs from
the in-memory store, and log update operations.

This change also include unit tests and store compliance tests.

The addition of the statestore package is split up into multiple
changeset to ease review. The final version of the package can be found
[here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore).

Once finalized, the libbeat/statestore package contains:
- The statestore frontend and interface for use within Beats
- Interfaces for the store backend
- A common set of tests store backends need to support
- a storetest package for testing new features that require a store. The
  testing helpers use map[string]interface{} that can be initialized or
  queried after the test run for validation purposes.
- The default memlog backend + tests
@urso urso removed the needs_backport PR is waiting to be backported to other branches. label Jul 7, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Implement store operation that get/set key value pairs from
the in-memory store, and log update operations.

This change also include unit tests and store compliance tests.

The addition of the statestore package is split up into multiple
changeset to ease review. The final version of the package can be found
[here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore).

Once finalized, the libbeat/statestore package contains:
- The statestore frontend and interface for use within Beats
- Interfaces for the store backend
- A common set of tests store backends need to support
- a storetest package for testing new features that require a store. The
  testing helpers use map[string]interface{} that can be initialized or
  queried after the test run for validation purposes.
- The default memlog backend + tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbeat Project:Filebeat-Input-v2 review skip-test-plan Team:Services (Deprecated) Label for the former Integrations-Services team v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants