Skip to content

Redis keys length should be limited #17

Closed
@wuyupengwoaini

Description

@wuyupengwoaini

@Override
public List<String> mget(String... keys) {
Span span = helper.buildSpan("mget", keys);
try {
return super.mget(keys);
} catch (Exception e) {
onError(e, span);
throw e;
} finally {
span.finish();
}
}

When client invoked mget function,and keys length is more than hundred or more,then the span data will be so big so that it will cost so much to transport the span data and to store span data.I think it will be a little help and cost so much. so i suppose there should be a limited length.

the same to the other functions releated many keys

Activity

self-assigned this
on Oct 30, 2018
malafeev

malafeev commented on Oct 30, 2018

@malafeev

@wuyupengwoaini how many keys you propose to limit?

wuyupengwoaini

wuyupengwoaini commented on Oct 31, 2018

@wuyupengwoaini
Author

I think it's better to config and default max length is 100 .what about you? @malafeev

malafeev

malafeev commented on Nov 1, 2018

@malafeev

currently I'm stuck to find a way to configure max length.
I don't want to double number of constructors.
It looks like setter is the best choice, only desire to make parameter immutable stops me.

wuyupengwoaini

wuyupengwoaini commented on Nov 2, 2018

@wuyupengwoaini
Author

I think builder design pattern is a good choice. Do you think so ?

added a commit that references this issue on Nov 2, 2018

#17 limit Redis keys length

added a commit that references this issue on Nov 5, 2018

#17 add javadoc and test

malafeev

malafeev commented on Nov 5, 2018

@malafeev

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @malafeev@wuyupengwoaini

      Issue actions

        Redis keys length should be limited · Issue #17 · opentracing-contrib/java-redis-client