Skip to content

Commit b0eb518

Browse files
committed
fix: update key storage
1 parent 594ccf6 commit b0eb518

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

filebeat/beater/store.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,20 @@ type filebeatStore struct {
6161
notifier *es.Notifier
6262
}
6363

64-
func storeKey(resolvedPath, backendName string) string {
64+
func storeKey(resolvedPath, backendName string, esExt backend.Registry) string {
6565
if backendName == "" {
6666
backendName = "memlog"
6767
}
68-
return backendName + "://" + resolvedPath
68+
key := backendName + "://" + resolvedPath
69+
if esExt != nil {
70+
key = fmt.Sprintf("%s|esext:%p", key, esExt)
71+
}
72+
return key
6973
}
7074

7175
func openStateStore(ctx context.Context, info beat.Info, logger *logp.Logger, cfg config.Registry, beatPaths *paths.Path) (*filebeatStore, error) {
7276
resolvedPath := beatPaths.Resolve(paths.Data, cfg.Path)
73-
key := storeKey(resolvedPath, cfg.Backend)
77+
key := storeKey(resolvedPath, cfg.Backend, cfg.ESStorageExtension)
7478

7579
globalMu.Lock()
7680
defer globalMu.Unlock()

0 commit comments

Comments
 (0)