Skip to content
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

pfmerge invokes PFADD instead of PFMERGE #158

Closed
christophstrobl opened this issue Dec 3, 2015 · 4 comments
Closed

pfmerge invokes PFADD instead of PFMERGE #158

christophstrobl opened this issue Dec 3, 2015 · 4 comments
Labels
type: bug A general bug

Comments

@christophstrobl
Copy link
Contributor

pfmerge should operate normally as soon as keys map to the same slot. But only the first key is considered.

Using lettuce 3.3.1 the following fails.

RedisAdvancedClusterConnection<String, String> connection = client.connectCluster();

assumeThat(SlotHash.getSlot("key2660") == SlotHash.getSlot("key7112"), is(true));
assumeThat(SlotHash.getSlot("key7112") == SlotHash.getSlot("key8885"), is(true));

connection.pfadd("key2660", "rand", "mat");
connection.pfadd("key7112", "mat", "perrin");

connection.pfmerge("key8885", "key2660", "key7112");

assertThat(connection.pfcount("key8885"), is(3L));
@mp911de mp911de added the type: bug A general bug label Dec 3, 2015
@mp911de
Copy link
Collaborator

mp911de commented Dec 3, 2015

Will take a look into it.

@mp911de
Copy link
Collaborator

mp911de commented Dec 3, 2015

Calling PFMERGE invokes currently PFADD in all versions (3.3, 3.4, 4.0 and 4.1). The signature of the pfmerge is method is Long pfmerge(...) but should be String pfmerge(...).

mp911de added a commit that referenced this issue Dec 3, 2015
The pfmerge command invoked PFADD instead of PFMERGE including a wrong method signature. This commit changes the signature from Long pfmerge(...) to String pfmerge() and respective for the async API and the pfmerge method does no longer invoke the PFADD command but the PFMERGE command.
mp911de added a commit that referenced this issue Dec 3, 2015
The pfmerge command invoked PFADD instead of PFMERGE including a wrong method signature. This commit changes the signature from Long pfmerge(...) to String pfmerge() and respective for the async API and the pfmerge method does no longer invoke the PFADD command but the PFMERGE command.
mp911de added a commit that referenced this issue Dec 3, 2015
The pfmerge command invoked PFADD instead of PFMERGE including a wrong method signature. This commit changes the signature from Long pfmerge(...) to String pfmerge() and respective for the async API and the pfmerge method does no longer invoke the PFADD command but the PFMERGE command.
mp911de added a commit that referenced this issue Dec 3, 2015
The pfmerge command invoked PFADD instead of PFMERGE including a wrong method signature. This commit changes the signature from Long pfmerge(...) to String pfmerge() and respective for the async API and the pfmerge method does no longer invoke the PFADD command but the PFMERGE command.
@mp911de
Copy link
Collaborator

mp911de commented Dec 3, 2015

Fixed in 3.3 , 3.4 (master), 4.0 and 4.1 branches. 3.3.2-SNAPSHOT and 3.4-SNAPSHOT jars are available in https://oss.sonatype.org/content/repositories/snapshots repo.

@mp911de mp911de changed the title RedisAdvancedClusterConnection#pfmerge only considers one source key. pfmerge invokes PFADD instead of PFMERGE Dec 3, 2015
@mp911de mp911de closed this as completed Dec 4, 2015
@mp911de
Copy link
Collaborator

mp911de commented Dec 11, 2015

Released 3.3.2.Final and 4.0.2.Final to Maven central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants