Coder Social home page Coder Social logo

Comments (6)

chenyang8094 avatar chenyang8094 commented on May 3, 2024

This is a documentation error not a code bug. The syntax of exhscan is fully compatible with redis hash now. We have corrected the documentation. Thanks for your report :).

from tairhash.

jjz921024 avatar jjz921024 commented on May 3, 2024

thank for you reply.

from tairhash.

jjz921024 avatar jjz921024 commented on May 3, 2024

This is a documentation error not a code bug. The syntax of exhscan is fully compatible with redis hash now. We have corrected the documentation. Thanks for your report :).

@chenyang8094 hi, i found exhscan is not fully compatible hscan about response body.

hscan return the first array type is String and exhscan return is Long.
it will cause exception when usage lettuce decode response,
because MapScanOutput cann't decode number (integer) response values

20211109155405

20211109153849

from tairhash.

yangbodong22011 avatar yangbodong22011 commented on May 3, 2024

@jjz921024 Hello, I understand your question. Can you provide your complete code so that we can reproduce this problem quickly?

from tairhash.

jjz921024 avatar jjz921024 commented on May 3, 2024

@yangbodong22011 I just want to extend lettuce api for support TairHash command.

Except of EXHSCAN, other commands is finish.

The problem is exhscan reponse must be decode ArrayList<Object> that is not friendly for user.
It should compatible with hscan command in lettuce implement,

// it ok, but not friendly
List<Object> exHScan1(K key, ScanCursor scanCursor, ScanArgs scanArgs);

// compatible with hscan API, but is will throw exception because of can't decode long
MapScanCursor<K, V> exHScan2(K key, ScanCursor scanCursor, ScanArgs scanArgs);

I have create a repo for this demo
https://github.com/jjz921024/redis-client-demo

from tairhash.

chenyang8094 avatar chenyang8094 commented on May 3, 2024

@yangbodong22011 I just want to extend lettuce api for support TairHash command.

Except of EXHSCAN, other commands is finish.

The problem is exhscan reponse must be decode ArrayList<Object> that is not friendly for user. It should compatible with hscan command in lettuce implement,

// it ok, but not friendly
List<Object> exHScan1(K key, ScanCursor scanCursor, ScanArgs scanArgs);

// compatible with hscan API, but is will throw exception because of can't decode long
MapScanCursor<K, V> exHScan2(K key, ScanCursor scanCursor, ScanArgs scanArgs);

I have create a repo for this demo https://github.com/jjz921024/redis-client-demo

Yes, there is indeed an incompatibility here, I have fixed it, the PR is #11

from tairhash.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.