正在显示
1 个修改的文件
包含
1 行增加
和
2 行删除
@@ -15,7 +15,6 @@ import ( | @@ -15,7 +15,6 @@ import ( | ||
15 | ) | 15 | ) |
16 | 16 | ||
17 | const ( | 17 | const ( |
18 | - sharedCallsKey = "ensureIndex" | ||
19 | timestampFormat = "2006-01-02T15:04:05.000Z" | 18 | timestampFormat = "2006-01-02T15:04:05.000Z" |
20 | timestampKey = "@timestamp" | 19 | timestampKey = "@timestamp" |
21 | ) | 20 | ) |
@@ -84,7 +83,7 @@ func (idx *Index) GetIndex(m map[string]interface{}) string { | @@ -84,7 +83,7 @@ func (idx *Index) GetIndex(m map[string]interface{}) string { | ||
84 | } | 83 | } |
85 | 84 | ||
86 | func (idx *Index) ensureIndex(index string) error { | 85 | func (idx *Index) ensureIndex(index string) error { |
87 | - _, err := idx.sharedCalls.Do(sharedCallsKey, func() (i interface{}, err error) { | 86 | + _, err := idx.sharedCalls.Do(index, func() (i interface{}, err error) { |
88 | idx.lock.Lock() | 87 | idx.lock.Lock() |
89 | defer idx.lock.Unlock() | 88 | defer idx.lock.Unlock() |
90 | 89 |
-
请 注册 或 登录 后发表评论