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

Introduce skeleton of memlog store #19261

Merged
merged 3 commits into from
Jun 25, 2020
Merged

Introduce skeleton of memlog store #19261

merged 3 commits into from
Jun 25, 2020

Conversation

urso
Copy link

@urso urso commented Jun 18, 2020

  • Enhancement

What does this PR do?

This changes introduces the skeleton and documentation of the memlog
store.

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

This change introduces the skeleton and internal documentation of the
memlog store for review and discussion, but not the full implementation
yet to ease review. The final implementation and unit tests will be
added later.

The file doc.go documents how the final implementation works. When reviewing please have a look at this file first to get an idea how the structures fit together.

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

  • [ ]

Related issues

This changes introduces the skeleton and documentation of the memlog
store.

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

This change introduces the skeleton and internal documentation of the
memlog store for review and discussion, but not the full implementation
yet to ease review. The final implementation and unit tests will be
added later.

The file doc.go documents how the final implementation works.
@urso urso added review Filebeat Filebeat 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 18, 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 18, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 18, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19261 updated]

  • Start Time: 2020-06-25T15:15:02.405+0000

  • Duration: 122 min 7 sec

Test stats 🧪

Test Results
Failed 2
Passed 9511
Skipped 1574
Total 11087

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat oss / test_reload_same_config – test_reload_inputs.Test

    • Age: 1
    • Duration: 16.367
    • Error Details: Timeout waiting for 'cond' to be true. Waited 15 seconds.
  • Name: Build and Test / Filebeat Mac OS X / test_clean_removed_with_clean_inactive – test_registrar.Test

    • Age: 1
    • Duration: 1.035
    • Error Details:
      -------------------- >> begin captured stdout << ---------------------
      registry size: 2
      registry size after remove: 2

--------------------- >> end captured stdout << ----------------------

Steps errors

Expand to view the steps failures

  • Name: Make -C filebeat testsuite

    • Description: make -C filebeat testsuite

    • Duration: 28 min 10 sec

    • Start Time: 2020-06-25T15:43:46.712+0000

    • log

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 7 min 41 sec

    • Start Time: 2020-06-25T16:09:40.243+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 0 min 12 sec

    • Start Time: 2020-06-25T16:18:23.949+0000

    • log

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-25T15:48:23.056+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-25T17:14:42.378Z]   Version:          1.0.0-rc8+dev
[2020-06-25T17:14:42.378Z]   GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
[2020-06-25T17:14:42.378Z]  docker-init:
[2020-06-25T17:14:42.378Z]   Version:          0.18.0
[2020-06-25T17:14:42.378Z]   GitCommit:        fec3683
[2020-06-25T17:16:40.980Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats
[2020-06-25T17:16:41.306Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-25T17:16:41.319Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Lint
[2020-06-25T17:16:41.406Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Winlogbeat-oss
[2020-06-25T17:16:41.481Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-06-25T17:16:41.555Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-06-25T17:16:41.634Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Dockerlogbeat
[2020-06-25T17:16:41.711Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Journalbeat-oss
[2020-06-25T17:16:41.790Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-06-25T17:16:41.864Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-06-25T17:16:41.953Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-06-25T17:16:42.033Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-06-25T17:16:42.121Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-06-25T17:16:42.197Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Heartbeat-oss
[2020-06-25T17:16:42.274Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-06-25T17:16:42.349Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-06-25T17:16:42.422Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-06-25T17:16:42.496Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-06-25T17:16:42.577Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Libbeat-x-pack
[2020-06-25T17:16:42.655Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-25T17:16:42.727Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-06-25T17:16:42.799Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-25T17:16:42.876Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Packetbeat-oss
[2020-06-25T17:16:42.948Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-06-25T17:16:43.021Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-Windows
[2020-06-25T17:16:43.103Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-25T17:16:43.177Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-06-25T17:16:43.250Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-06-25T17:16:43.327Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-06-25T17:16:43.401Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-oss
[2020-06-25T17:16:43.472Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-06-25T17:16:43.544Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-06-25T17:16:43.625Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-06-25T17:16:43.700Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-06-25T17:16:43.779Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-06-25T17:16:43.850Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-06-25T17:16:43.929Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-06-25T17:16:44.009Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Libbeat-oss
[2020-06-25T17:16:44.080Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-06-25T17:16:44.151Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-06-25T17:16:44.228Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-06-25T17:16:44.299Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-06-25T17:16:44.372Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-06-25T17:16:44.446Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Heartbeat-Windows
[2020-06-25T17:16:44.518Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Functionbeat-Windows
[2020-06-25T17:16:44.594Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-06-25T17:16:44.673Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-06-25T17:16:44.750Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-06-25T17:16:45.110Z] + cat
[2020-06-25T17:16:45.111Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-25T17:16:45.111Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-25T17:16:51.738Z] runbld>>> runbld started
[2020-06-25T17:16:51.738Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-06-25T17:16:53.670Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19261' in order of occurrence in the config (last value wins).
[2020-06-25T17:16:55.073Z] runbld>>> Debug logging enabled.
[2020-06-25T17:16:55.073Z] runbld>>> Storing result
[2020-06-25T17:16:55.073Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-25T17:16:55.073Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200625171654-6D0C8007
[2020-06-25T17:16:55.073Z] runbld>>> Adding system facts.
[2020-06-25T17:16:56.056Z] runbld>>> Adding vcs info for the latest commit:  5e800bd276db37aeebbeb1a04a59d9f977de8fc0
[2020-06-25T17:16:56.056Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-25T17:16:56.056Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-25T17:16:56.056Z] Processing JUnit reports with runbld...
[2020-06-25T17:16:56.056Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-25T17:16:56.636Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-25T17:16:56.636Z] runbld>>> DURATION: 31ms
[2020-06-25T17:16:56.636Z] runbld>>> STDOUT: 40 bytes
[2020-06-25T17:16:56.636Z] runbld>>> STDERR: 49 bytes
[2020-06-25T17:16:56.636Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-25T17:16:56.636Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats
[2020-06-25T17:16:58.035Z] runbld>>> Storing build metadata: 
[2020-06-25T17:16:58.035Z] runbld>>> Adding test report.
[2020-06-25T17:16:58.035Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats
[2020-06-25T17:16:59.442Z] runbld>>> Found 115 test output files
[2020-06-25T17:17:00.024Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-06-25T17:17:00.024Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-06-25T17:17:00.024Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-06-25T17:17:00.024Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-06-25T17:17:00.292Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-06-25T17:17:00.292Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-06-25T17:17:00.292Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-06-25T17:17:01.688Z] runbld>>> Test output logs contained: Errors: 1 Failures: 1 Tests: 10937 Skipped: 1335
[2020-06-25T17:17:01.688Z] runbld>>> Storing result
[2020-06-25T17:17:01.688Z] runbld>>> FAILURES: 2
[2020-06-25T17:17:02.263Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-25T17:17:02.263Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200625171654-6D0C8007
[2020-06-25T17:17:02.263Z] runbld>>> Email notification disabled by environment variable.
[2020-06-25T17:17:02.263Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-25T17:17:08.235Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19261
[2020-06-25T17:17:08.343Z] [INFO] getVaultSecret: Getting secrets
[2020-06-25T17:17:08.402Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-25T17:17:09.239Z] + chmod 755 generate-build-data.sh
[2020-06-25T17:17:09.239Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19261/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19261/runs/6 FAILURE 7326573
[2020-06-25T17:17:09.239Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19261/runs/6/steps/?limit=10000 -o steps-info.json
[2020-06-25T17:17:11.723Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19261/runs/6/tests/?status=FAILED -o tests-errors.json

@kvch kvch self-requested a review June 18, 2020 08:08
@andresrc andresrc added [zube]: In Review Team:Platforms Label for the Integrations - Platforms team and removed [zube]: Inbox labels Jun 22, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

Nice documentation for this!

libbeat/statestore/backend/memlog/util_windows.go Outdated Show resolved Hide resolved
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
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 excellent! The comments were very helpful. Found some typos and minor suggestions, but nothing that would need another pass, so approved.

libbeat/statestore/backend/memlog/diskstore.go Outdated Show resolved Hide resolved
libbeat/statestore/backend/memlog/diskstore.go Outdated Show resolved Hide resolved
libbeat/statestore/backend/memlog/diskstore.go Outdated Show resolved Hide resolved
libbeat/statestore/backend/memlog/diskstore.go Outdated Show resolved Hide resolved
// specific language governing permissions and limitations
// under the License.

// Package memlog implements the memlog statestore backend.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to put this content in a README.md instead? That would have the additional benefit that it would be automatically rendered when browsing this package directory on github, which helps discoverability.

Copy link
Author

Choose a reason for hiding this comment

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

Hm, interesting point. I have put it here, because I use go docs :)

// The data files filenames do include the change sequence number. Which allows
// us to sort them by name. The checkpoint operation of memlog, writes the full state
// into a new data file, that consists of an JSON array with all known key-value pairs.
// All fields of an entry are store top-level in the object. The `_key` field
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 what this sentence ("All fields...") means: it sounds like it's saying the object has a flat structure, but the description above says that map[string]interface{} can be included, so I think I'm misunderstanding what "entry" is referring to here, could that be clarified?

Copy link
Author

Choose a reason for hiding this comment

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

Will try. It's indeed an object that supports nesting (map[string]interface{})

libbeat/statestore/backend/memlog/util.go Outdated Show resolved Hide resolved
@urso urso merged commit c0f1b75 into elastic:master Jun 25, 2020
@urso urso deleted the memlog-init branch June 25, 2020 19:42
urso pushed a commit to urso/beats that referenced this pull request Jul 6, 2020
Introduce skeleton of memlog store

This changes introduces the skeleton and documentation of the memlog
store.

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

This change introduces the skeleton and internal documentation of the
memlog store for review and discussion, but not the full implementation
yet to ease review. The final implementation and unit tests will be
added later.

The file doc.go documents how the final implementation works.

(cherry picked from commit c0f1b75)
@urso urso removed the needs_backport PR is waiting to be backported to other branches. label Jul 6, 2020
urso pushed a commit that referenced this pull request Jul 7, 2020
Introduce skeleton of memlog store

This changes introduces the skeleton and documentation of the memlog
store.

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

This change introduces the skeleton and internal documentation of the
memlog store for review and discussion, but not the full implementation
yet to ease review. The final implementation and unit tests will be
added later.

The file doc.go documents how the final implementation works.

(cherry picked from commit c0f1b75)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Introduce skeleton of memlog store

This changes introduces the skeleton and documentation of the memlog
store.

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

This change introduces the skeleton and internal documentation of the
memlog store for review and discussion, but not the full implementation
yet to ease review. The final implementation and unit tests will be
added later.

The file doc.go documents how the final implementation works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat libbeat Project:Filebeat-Input-v2 review skip-test-plan Team:Platforms Label for the Integrations - Platforms team 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.

6 participants