v2.8.1
What's Changed
- fix(deps): update dependency me.ahoo.cosid:cosid-bom to v2.8.0 by @renovate in #566
- feat(core): support
GroupedKey
forSegmentIdStat
by @Ahoo-Wang in #567 - feat(doc): Update specific-id.md by @Ahoo-Wang in #568
YearMonthDayGroupBySupplier
使用 SegmentId 算法,要求输出的ID字符串:
- 起始序号:
0
- 格式:
<prefix><year_month_day><sequence>
- 分组:按日期分组,序号从0开始。即明天序号需要重置为0.
- 序号位:8位数值,不足8位前补0
- 例如:
BIZ-240516-00000001
cosid:
segment:
enabled: true
distributor:
type: redis
provider:
group_year_month_day_biz:
group:
by: year_month_day
pattern: yyMMdd
converter:
type: to_string
to-string:
pad-start: true
char-size: 8
prefix: BIZ-
group-prefix:
enabled: true
配置信息:
{
"group_year_month_day_biz": {
"kind": "StringSegmentId",
"actual": {
"kind": "SegmentChainId",
"fetchTime": 1715911765,
"maxId": 280,
"offset": 260,
"sequence": 260,
"step": 20,
"isExpired": false,
"isOverflow": false,
"isAvailable": true,
"groupedKey": {
"key": "240517",
"ttlAt": 1715961599
},
"converter": {
"kind": "Radix62IdConverter",
"radix": 62,
"charSize": 11,
"padStart": true,
"maxId": 9223372036854776000
}
},
"converter": {
"kind": "PrefixIdConverter",
"prefix": "BIZ-",
"actual": {
"kind": "GroupedPrefixIdConverter",
"delimiter": "-",
"actual": {
"kind": "ToStringIdConverter",
"padStart": true,
"charSize": 8
}
}
}
}
}
Full Changelog: v2.8.0...v2.8.1