-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Make ES number of shards and replicas configurable #303
Conversation
pkg/es/config/config.go
Outdated
@@ -31,11 +31,13 @@ import ( | |||
|
|||
// Configuration describes the configuration properties needed to connect to a ElasticSearch cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an
ctx := context.Background() | ||
if numShards == 0 { | ||
numShards = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consts
@@ -178,10 +179,16 @@ func TestSpanWriter_WriteSpan(t *testing.T) { | |||
spanExistsService.On("Do", mock.AnythingOfType("*context.emptyCtx")).Return(testCase.spanIndexExists, nil) | |||
|
|||
serviceCreateService := &mocks.IndicesCreateService{} | |||
serviceMapping = strings.Replace(serviceMapping, "${__NUMBER_OF_SHARDS__}", strconv.FormatInt(w.writer.numShards, 10), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any better way to test this? right now you're using the same replace logic in the code and in the test to ensure the mapping was replaced.
Resolves #300