alibaba / alibaba/cobar

关于hash分片计算方法,请赐教

Open
#77 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

单实例下,现有128个分库,8039709005,5907536637 这两个字符串,我用他们的hashcode取值后,对1024取模,结果是543,-383。怎么算也不在一个库里。请教下,字符串是怎么计算分片的

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named in the issue. Start by locating Cobar's hash-based sharding algorithm and its configuration or documentation, then trace how the two supplied strings are converted and mapped with 1024 buckets. Done means explaining why the two values do or do not map to the same database.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.