Skip to content

Commit

Permalink
Merge branch 'main' into fix-control-plane-toleration
Browse files Browse the repository at this point in the history
  • Loading branch information
constanca-m authored Feb 20, 2024
2 parents fb0c409 + b9a75c9 commit 4833bbd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Setting environmental variable ELASTIC_NETINFO:false in Elastic Agent pod will d
- Add support for PEM-based Okta auth in CEL. {pull}37813[37813]
- Add ETW input. {pull}36915[36915]
- Update CEL mito extensions to v1.9.0 to add keys/values helper. {pull}37971[37971]
- Add logging for cache processor file reads and writes. {pull}38052[38052]

*Auditbeat*

Expand Down
5 changes: 5 additions & 0 deletions libbeat/processors/cache/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func (c *fileStore) readState() {
// through all the elements. If any survive the filter, we
// were alive, otherwise delete the file.

c.log.Infow("reading state from file", "id", c.id, "path", c.path)
dec := json.NewDecoder(f)
for {
var e CacheEntry
Expand All @@ -209,6 +210,7 @@ func (c *fileStore) readState() {
heap.Push(&c.expiries, &e)
}

c.log.Infow("got state from file", "id", c.id, "entries", len(c.cache))
if len(c.cache) != 0 {
return
}
Expand Down Expand Up @@ -243,6 +245,7 @@ func (c *fileStore) writeState(final bool) {
if !c.dirty {
return
}
c.log.Infow("write state to file", "id", c.id, "path", c.path)
if len(c.cache) == 0 && final {
err := os.Remove(c.path)
if err != nil {
Expand Down Expand Up @@ -278,6 +281,7 @@ func (c *fileStore) writeState(final bool) {
if err != nil {
c.log.Errorw("failed to finalize writing state", "error", err)
}
c.log.Infow("write state to file sync and replace succeeded", "id", c.id, "path", c.path)
}()

enc := json.NewEncoder(f)
Expand All @@ -297,4 +301,5 @@ func (c *fileStore) writeState(final bool) {
}
// Only mark as not dirty if we succeeded in the write.
c.dirty = false
c.log.Infow("write state to file succeeded", "id", c.id, "path", c.path)
}
6 changes: 3 additions & 3 deletions testing/environments/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '2.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0-7ad20c93-SNAPSHOT
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0-772867d3-SNAPSHOT
# When extend is used it merges healthcheck.tests, see:
# https://github.com/docker/compose/issues/8962
# healthcheck:
Expand Down Expand Up @@ -31,7 +31,7 @@ services:
- "./docker/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles"

logstash:
image: docker.elastic.co/logstash/logstash:8.13.0-7ad20c93-SNAPSHOT
image: docker.elastic.co/logstash/logstash:8.13.0-772867d3-SNAPSHOT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"]
retries: 600
Expand All @@ -44,7 +44,7 @@ services:
- 5055:5055

kibana:
image: docker.elastic.co/kibana/kibana:8.13.0-7ad20c93-SNAPSHOT
image: docker.elastic.co/kibana/kibana:8.13.0-772867d3-SNAPSHOT
environment:
- "ELASTICSEARCH_USERNAME=kibana_system_user"
- "ELASTICSEARCH_PASSWORD=testing"
Expand Down

0 comments on commit 4833bbd

Please sign in to comment.