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

countly-browser可以帮我解释一下shardname 产生的使用的什么规则吗 #4332

Open
jikuanyu opened this issue Jun 30, 2023 · 1 comment

Comments

@jikuanyu
Copy link

Expected Behavior

我看了一下表结构:
https://support.count.ly/hc/en-us/articles/360037681892-countly-browser

There are 4 types of documents available:

Zero document, which id is formed from {appID}{year}:0 And it contains stats breakdown by months and weeks for the specified year
Month document, which id is formed from {appID}
{year}:{month} And it contains stats breakdown by days of the month
Splitted zero document which id is formed from {appID}{year}:0{shardname}
Splitted month document which id is formed from {appID}{year}:{month}{shardname}

可以帮我解释一下shardname 产生的使用的什么规则吗

Current Behavior

Screenshots (if appropriate):

Possible Solution

Steps to Reproduce (for bugs)

More Description

Your Environment

  • Operating System and version:
  • Any changes you have made to your instance:
@ar2rsawseen
Copy link
Member

Hello
We take the value of the browser, like Chrome, and do a base64 encode, and take the first letter of the result.
That way there are possible 64 shards, and the same browser value will always land in the say document for consistency

postfix = common.crypto.createHash("md5").update(recvMetricValue).digest('base64')[0];

Hope that helps :)

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

No branches or pull requests

2 participants