Universal, flexible, high-performance distributed ID generator

Overview

CosId Universal, flexible, high-performance distributed ID generator

中文文档

Introduction

CosId aims to provide a universal, flexible and high-performance distributed ID generator. Two types of ID generators are currently provided:

  • SnowflakeId : Stand-alone TPS performance:4,096,000 JMH Benchmark , It mainly solves two major problems of SnowflakeId: machine number allocation problem and clock backwards problem and provide a more friendly and flexible experience.
  • SegmentId: Get a segment (Step) ID every time to reduce the network IO request frequency of the IdSegment distributor and improve performance.
    • IdSegmentDistributor:
      • RedisIdSegmentDistributor: IdSegment distributor based on Redis.
      • JdbcIdSegmentDistributor: The Jdbc-based IdSegment distributor supports various relational databases.
    • SegmentChainId(recommend):SegmentChainId (lock-free) is an enhancement of SegmentId, the design diagram is as follows. PrefetchWorker maintains a safe distance, so that SegmentChainId achieves approximately AtomicLong TPS performance (Step 1000): 127,439,148+/s JMH Benchmark .
      • PrefetchWorker maintains a safe distance (safeDistance), and supports dynamic safeDistance expansion and contraction based on hunger status.

SnowflakeId

Snowflake

SnowflakeId is a distributed ID algorithm that uses Long (64 bits) bit partition to generate ID. The general bit allocation scheme is : timestamp (41 bits) + machineId (10 bits) + sequence (12 bits) = 63 bits 。

  • 41 bits timestamp = (1L<<41)/(1000/3600/365) approximately 69 years of timestamp can be stored, that is, the usable absolute time is EPOCH + 69 years. Generally, we need to customize EPOCH as the product development time. In addition, we can increase the number of allocated bits by compressing other areas, The number of timestamp bits to extend the available time.
  • 10 bits machineId = (1L<<10) = 1024 That is, 1024 copies of the same business can be deployed (there is no master-slave copy in the Kubernetes concept, and the definition of Kubernetes is directly used here) instances. Generally, there is no need to use so many, so it will be redefined according to the scale of deployment.
  • 12 bits sequence = (1L<<12) * 1000 = 4096000 That is, a single machine can generate about 409W ID per second, and a global same-service cluster can generate 40960001024=419430W=4.19 billion (TPS).

It can be seen from the design of SnowflakeId:

  • 👍 The first 41 bits are a timestamp,So SnowflakeId is local monotonically increasing, and affected by global clock synchronization SnowflakeId is global trend increasing.
  • 👍 SnowflakeId does not have a strong dependency on any third-party middleware, and its performance is also very high.
  • 👍 The bit allocation scheme can be flexibly configured according to the needs of the business system to achieve the optimal use effect.
  • 👎 Strong reliance on the local clock, potential clock moved backwards problems will cause ID duplication.
  • 👎 The machineId needs to be set manually. If the machineId is manually assigned during actual deployment, it will be very inefficient.

CosId-SnowflakeId

It mainly solves two major problems of SnowflakeId: machine number allocation problem and clock backwards problem and provide a more friendly and flexible experience.

MachineIdDistributor

Currently CosId provides the following three MachineId distributors.

ManualMachineIdDistributor

cosid:
  snowflake:
    machine:
      distributor:
        type: manual
        manual:
          machine-id: 0

Manually distribute MachineId

StatefulSetMachineIdDistributor

cosid:
  snowflake:
    machine:
      distributor:
        type: stateful_set

Use the stable identification ID provided by the StatefulSet of Kubernetes as the machine number.

RedisMachineIdDistributor

RedisMachineIdDistributor

cosid:
  snowflake:
    machine:
      distributor:
        type: redis

Use Redis as the distribution store for the machine number.

ClockBackwardsSynchronizer

cosid:
  snowflake:
    clock-backwards:
      spin-threshold: 10
      broken-threshold: 2000

The default DefaultClockBackwardsSynchronizer clock moved backwards synchronizer uses active wait synchronization strategy, spinThreshold (default value 10 milliseconds) is used to set the spin wait threshold, when it is greater than spinThreshold, use thread sleep to wait for clock synchronization, if it exceeds BrokenThreshold (default value 2 seconds) will directly throw a ClockTooManyBackwardsException exception.

MachineStateStorage

public class MachineState {
  public static final MachineState NOT_FOUND = of(-1, -1);
  private final int machineId;
  private final long lastTimeStamp;

  public MachineState(int machineId, long lastTimeStamp) {
    this.machineId = machineId;
    this.lastTimeStamp = lastTimeStamp;
  }

  public int getMachineId() {
    return machineId;
  }

  public long getLastTimeStamp() {
    return lastTimeStamp;
  }

  public static MachineState of(int machineId, long lastStamp) {
    return new MachineState(machineId, lastStamp);
  }
}
cosid:
  snowflake:
    machine:
      state-storage:
        local:
          state-location: ./cosid-machine-state/

The default LocalMachineStateStorage local machine state storage uses a local file to store the machine number and the most recent timestamp, which is used as a MachineState cache.

ClockSyncSnowflakeId

cosid:
  snowflake:
    share:
      clock-sync: true

The default SnowflakeId will directly throw a ClockBackwardsException when a clock moved backwards occurs, while using the ClockSyncSnowflakeId will use the ClockBackwardsSynchronizer to actively wait for clock synchronization to regenerate the ID, providing a more user-friendly experience.

SafeJavaScriptSnowflakeId

SnowflakeId snowflakeId = SafeJavaScriptSnowflakeId.ofMillisecond(1);

The Number.MAX_SAFE_INTEGER of JavaScript has only 53 bits. If the 63-bit SnowflakeId is directly returned to the front end, the value will overflow. Usually we can convert SnowflakeId to String type or customize SnowflakeId Bit allocation is used to shorten the number of bits of SnowflakeId so that ID does not overflow when it is provided to the front end.

SnowflakeFriendlyId (Can parse SnowflakeId into a more readable SnowflakeIdState)

cosid:
  snowflake:
    share:
      friendly: true
public class SnowflakeIdState {

    private final long id;

    private final int machineId;

    private final long sequence;

    private final LocalDateTime timestamp;
    /**
     * {@link #timestamp}-{@link #machineId}-{@link #sequence}
     */
    private final String friendlyId;
}
public interface SnowflakeFriendlyId extends SnowflakeId {

    SnowflakeIdState friendlyId(long id);

    SnowflakeIdState ofFriendlyId(String friendlyId);

    default SnowflakeIdState friendlyId() {
        long id = generate();
        return friendlyId(id);
    }
}
        SnowflakeFriendlyId snowflakeFriendlyId=new DefaultSnowflakeFriendlyId(snowflakeId);
        SnowflakeIdState idState = snowflakeFriendlyId.friendlyId();
        idState.getFriendlyId(); //20210623131730192-1-0

SegmentId

SegmentId

RedisIdSegmentDistributor

cosid:
  segment:
    enabled: true
    distributor:
      type: redis

JdbcIdSegmentDistributor

Initialize the cosid table

create table if not exists cosid
(
    name            varchar(100) not null comment '{namespace}.{name}',
    last_max_id     bigint       not null default 0,
    last_fetch_time bigint       not null,
    constraint cosid_pk
        primary key (name)
) engine = InnoDB;
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/test_db
    username: root
    password: root
cosid:
  segment:
    enabled: true
    distributor:
      type: jdbc
      jdbc:
        enable-auto-init-cosid-table: false
        enable-auto-init-id-segment: true

After enabling enable-auto-init-id-segment:true, the application will try to create the idSegment record when it starts to avoid manual creation. Similar to the execution of the following initialization sql script, there is no need to worry about misoperation, because name is the primary key.

insert into cosid
    (name, last_max_id, last_fetch_time)
    value
    ('namespace.name', 0, unix_timestamp());

SegmentChainId

SegmentChainId

cosid:
  segment:
    enabled: true
    mode: chain
    chain:
      safe-distance: 5
      prefetch-worker:
        core-pool-size: 2
        prefetch-period: 1s
    distributor:
      type: redis
    share:
      offset: 0
      step: 100
    provider:
      bizC:
        offset: 10000
        step: 100
      bizD:
        offset: 10000
        step: 100

IdGeneratorProvider

cosid:
  snowflake:
    provider:
      bizA:
        #      timestamp-bit:
        sequence-bit: 12
      bizB:
        #      timestamp-bit:
        sequence-bit: 12
IdGenerator idGenerator = idGeneratorProvider.get("bizA");

In actual use, we generally do not use the same IdGenerator for all business services, but different businesses use different IdGenerator, then IdGeneratorProvider exists to solve this problem, and it is the container of IdGenerator , You can get the corresponding IdGenerator by the business name.

Examples

CosId-Examples

http://localhost:8080/swagger-ui/index.html#/

Installation

Gradle

Kotlin DSL

    val cosidVersion = "1.3.2";
    implementation("me.ahoo.cosid:spring-boot-starter-cosid:${cosidVersion}")

Maven

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <artifactId>demo</artifactId>
    <properties>
        <cosid.version>1.3.2</cosid.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>me.ahoo.cosid</groupId>
            <artifactId>spring-boot-starter-cosid</artifactId>
            <version>${cosid.version}</version>
        </dependency>
    </dependencies>

</project>

application.yaml

spring:
  application:
    name: ${service.name:cosid-example}
  datasource:
    url: jdbc:mysql://localhost:3306/test_db
    username: root
    password: root
  redis:
    url: redis://localhost:6379
cosid:
  namespace: ${spring.application.name}
  snowflake:
    enabled: true
    #    epoch: 1577203200000
    clock-backwards:
      spin-threshold: 10
      broken-threshold: 2000
    machine:
      #      stable: true
      #      machine-bit: 10
      #      instance-id: ${HOSTNAME}
      distributor:
        type: redis
      #        manual:
      #          machine-id: 0
      state-storage:
        local:
          state-location: ./cosid-machine-state/
    share:
      clock-sync: true
      friendly: true
    provider:
      bizA:
        #        timestamp-bit:
        sequence-bit: 12
      bizB:
        #        timestamp-bit:
        sequence-bit: 12
  segment:
    enabled: true
    mode: chain
    chain:
      safe-distance: 5
      prefetch-worker:
        core-pool-size: 2
        prefetch-period: 1s
    distributor:
      type: redis
    share:
      offset: 0
      step: 100
    provider:
      bizC:
        offset: 10000
        step: 100
      bizD:
        offset: 10000
        step: 100

JMH-Benchmark

  • The development notebook : MacBook Pro (M1)
  • All benchmark tests are carried out on the development notebook.
  • Deploying Redis on the development notebook.

SnowflakeId

gradle cosid-core:jmh
# or
java -jar cosid-core/build/libs/cosid-core-1.3.2-jmh.jar -bm thrpt -wi 1 -rf json -f 1
Benchmark                                                    Mode  Cnt        Score   Error  Units
SnowflakeIdBenchmark.millisecondSnowflakeId_friendlyId      thrpt       4020311.665          ops/s
SnowflakeIdBenchmark.millisecondSnowflakeId_generate        thrpt       4095403.859          ops/s
SnowflakeIdBenchmark.safeJsMillisecondSnowflakeId_generate  thrpt        511654.048          ops/s
SnowflakeIdBenchmark.safeJsSecondSnowflakeId_generate       thrpt        539818.563          ops/s
SnowflakeIdBenchmark.secondSnowflakeId_generate             thrpt       4206843.941          ops/s

RedisChainIdBenchmark

Throughput (ops/s)

RedisChainIdBenchmark-Throughput

gradle cosid-redis:jmh
# or
java -jar cosid-redis/build/libs/cosid-redis-1.3.2-jmh.jar -bm thrpt -wi 1 -rf json -f 1 RedisChainIdBenchmark
Benchmark                                   Mode  Cnt          Score          Error  Units
RedisChainIdBenchmark.atomicLong_baseline  thrpt    5  144541334.198 ±  5578137.471  ops/s
RedisChainIdBenchmark.step_1               thrpt    5    1874168.687 ±   310274.706  ops/s
RedisChainIdBenchmark.step_100             thrpt    5  114226113.524 ± 15789563.078  ops/s
RedisChainIdBenchmark.step_1000            thrpt    5  127439148.104 ±  1833743.699  ops/s

Percentile-Sample (P9999=0.208 us/op)

In statistics, a percentile (or a centile) is a score below which a given percentage of scores in its frequency distribution falls (exclusive definition) or a score at or below which a given percentage falls (inclusive definition). For example, the 50th percentile (the median) is the score below which (exclusive) or at or below which (inclusive) 50% of the scores in the distribution may be found.

RedisChainIdBenchmark-Sample

java -jar cosid-redis/build/libs/cosid-redis-1.3.2-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000
Benchmark                                            Mode      Cnt   Score    Error  Units
RedisChainIdBenchmark.step_1000                    sample  1336271   0.024 ±  0.001  us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.00    sample              ≈ 0           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.50    sample            0.041           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.90    sample            0.042           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.95    sample            0.042           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.99    sample            0.042           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.999   sample            0.042           us/op
RedisChainIdBenchmark.step_1000:step_1000·p0.9999  sample            0.208           us/op
RedisChainIdBenchmark.step_1000:step_1000·p1.00    sample           37.440           us/op

MySqlChainIdBenchmark

Throughput (ops/s)

MySqlChainIdBenchmark-Throughput

gradle cosid-jdbc:jmh
# or
java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.2-jmh.jar -bm thrpt -wi 1 -rf json -f 1 MySqlChainIdBenchmark
Benchmark                                   Mode  Cnt          Score         Error  Units
MySqlChainIdBenchmark.atomicLong_baseline  thrpt    5  145294642.937 ±  224876.284  ops/s
MySqlChainIdBenchmark.step_1               thrpt    5      35058.790 ±   36226.041  ops/s
MySqlChainIdBenchmark.step_100             thrpt    5   74575876.804 ± 5590390.811  ops/s
MySqlChainIdBenchmark.step_1000            thrpt    5  123131804.260 ± 1488004.409  ops/s

Percentile-Sample (P9999=0.208 us/op)

MySqlChainIdBenchmark-Sample

java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.2-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000
Benchmark                                            Mode      Cnt    Score   Error  Units
MySqlChainIdBenchmark.step_1000                    sample  1286774    0.024 ± 0.001  us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.00    sample               ≈ 0          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.50    sample             0.041          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.90    sample             0.042          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.95    sample             0.042          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.99    sample             0.042          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.999   sample             0.083          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p0.9999  sample             0.208          us/op
MySqlChainIdBenchmark.step_1000:step_1000·p1.00    sample           342.528          us/op
Comments
  • The SpringBoot project built by Gradle dependency the okhttp 4.x version (upgrade version) after the component is config, and an error is reported when compiling

    The SpringBoot project built by Gradle dependency the okhttp 4.x version (upgrade version) after the component is config, and an error is reported when compiling

    Bug Report

    Before report a bug, make sure you have:

    Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

    Please answer these questions before submitting your issue. Thanks!

    Which version of CosId did you use?

    1.10.2

    Expected behavior

    Gradle build succeeded

    Actual behavior

    Gradle build error

    > Task :compileJava FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileJava'.
    > Could not resolve all files for configuration ':compileClasspath'.
       > Could not resolve com.squareup.okhttp3:okhttp:3.14.9.
         Required by:
             project : > me.ahoo.cosid:cosid-core:1.10.2 > me.ahoo.cosid:cosid-dependencies:1.10.2
          > No matching variant of com.squareup.okhttp3:okhttp:4.9.3 was found. The consumer was configured to find an API of a component compatible with Java 11, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.gradle.category' with value 'platform' but:
              - Variant 'apiElements' capability com.squareup.okhttp3:okhttp:4.9.3 declares an API of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component, as well as attribute 'org.gradle.category' with value 'library' and the consumer needed a component, as well as attribute 'org.gradle.category' with value 'platform'
                  - Other compatible attribute:
                      - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
              - Variant 'javadocElements' capability com.squareup.okhttp3:okhttp:4.9.3 declares a runtime of a component, and its dependencies declared externally:
                  - Incompatible because this component declares a component, as well as attribute 'org.gradle.category' with value 'documentation' and the consumer needed a component, as well as attribute 'org.gradle.category' with value 'platform'
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                      - Doesn't say anything about its target Java version (required compatibility with Java 11)
                      - Doesn't say anything about its elements (required them preferably in the form of class files)
              - Variant 'runtimeElements' capability com.squareup.okhttp3:okhttp:4.9.3 declares a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component, as well as attribute 'org.gradle.category' with value 'library' and the consumer needed a component, as well as attribute 'org.gradle.category' with value 'platform'
                  - Other compatible attribute:
                      - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
              - Variant 'sourcesElements' capability com.squareup.okhttp3:okhttp:4.9.3 declares a runtime of a component, and its dependencies declared externally:
                  - Incompatible because this component declares a component, as well as attribute 'org.gradle.category' with value 'documentation' and the consumer needed a component, as well as attribute 'org.gradle.category' with value 'platform'
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                      - Doesn't say anything about its target Java version (required compatibility with Java 11)
                      - Doesn't say anything about its elements (required them preferably in the form of class files)
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
    
    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    
    See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
    
    BUILD FAILED in 2s
    2 actionable tasks: 1 executed, 1 up-to-date
    

    Reason analyze (If you can)

    Steps to reproduce the behavior

    execute gradle clean build -x test

    Example codes for reproduce this issue (such as a github link).

    ext {
        set('springCloudVersion', "2021.0.2")
        set('cosidVersion', '1.10.2')
        set('okhttpVersionn', '4.9.3')
    }
    
    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    
        implementation 'me.ahoo.cosid:cosid-core'
        implementation 'me.ahoo.cosid:cosid-jackson'
        implementation 'me.ahoo.cosid:cosid-jdbc'
        implementation 'me.ahoo.cosid:cosid-mybatis'
        implementation 'me.ahoo.cosid:cosid-redis'
        implementation 'me.ahoo.cosid:cosid-shardingsphere'
        implementation 'me.ahoo.cosid:cosid-spring-boot-starter'
        implementation 'me.ahoo.cosid:cosid-spring-redis'
        implementation 'me.ahoo.cosid:cosid-zookeeper'
    
        implementation "com.squareup.okhttp3:okhttp:${okhttpVersionn}"
    }
    
    good first issue dependency 
    opened by xingguang2013 7
  • @CosId标记的是触发号段模式吗?

    @CosId标记的是触发号段模式吗?

    debug的时候配置的是:

    cosid:
    
      namespace: ${spring.application.name}
      snowflake:
        enabled: true
        machine:
          distributor:
            type: redis
    
    
    

    默认是share的ID生成器吧 我代码获取的和 @Cosid生成的数字不一直 刚刚开始看代码 有点懵逼 望解答 代码是这样获取的

          // 获取的是 315557917682049024    3开头的
          long id = idGeneratorProvider.getShare().generate();
    

    实体打注解的

       // 生成的id为 :6922446069401911327
      @CosId
      @TableId(value = "id", type = IdType.INPUT)
      private Long id;
    
    
    

    想请问 手动获取创建的id也想要 6开头的怎么弄 可以吗?

    question 
    opened by qinkangdeid 5
  • It's better to return consistent sub-type of Collection in IntervalTimeline.sharding method

    It's better to return consistent sub-type of Collection in IntervalTimeline.sharding method

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    CosId was added in Apache ShardingSphere recently, when I'm running shardingsphere-sharding-core module's unit test in IDEA, it has some failed cases of CosIdIntervalShardingAlgorithmTest which are related with IntervalTimeline.sharding. Failed result: 图片

    Related code:

            @Test
            public void assertDoSharding() {
                RangeShardingValue shardingValue = new RangeShardingValue<>(LOGIC_NAME, COLUMN_NAME, rangeValue);
                Collection<String> actual = shardingAlgorithm.doSharding(ALL_NODES, shardingValue);
                assertThat(actual, is(expected));
            }
    

    In fact, actual and expected has the same elements, but they're different Collection's sub-type, so they're not equals. Debug screenshot: WX20220108-124508@2x

    actual is instance of Collections$SingletonSet, but expected is instance of ExactCollection.

    Describe the solution you'd like A clear and concise description of what you want to happen.

    In IntervalTimeline.java

        @Override
        public Collection<String> sharding(Range<LocalDateTime> shardingValue) {
    //...
            if (lowerOffset == upperOffset) {
                return Collections.singleton(lastInterval.getNode());
            }
    //...
            ExactCollection<String> nodes = new ExactCollection<>(nodeSize);
    //...
            return nodes;
        }
    

    Collections.singleton(lastInterval.getNode()) could be replaced to return ExactCollection or , just like other return statements.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    It's possible to fix it by changingexpected in CosIdIntervalShardingAlgorithmTest.rangeArgsProvider, but it's a little strange, users should not concern about the implementation of IntervalTimeline.sharding.

    Additional context Add any other context or screenshots about the feature request here.

    opened by sandynz 5
  • Help specific documents

    Help specific documents

    Hello, in combination with whether there are specific documents for springboot, I can see that there are some configurations in readme, but there is no specific description for many springboot configurations. Can you provide a specific configuration description? Furthermore, the description of different packages in Maven warehouse. thank you

    And are there best practices. Moreover, the cosid-rest-api failed

    documentation good first issue 
    opened by AprilViolet 5
  • 在使用k8s的HPA做弹性伸缩的时候,可能存在的号段被浪费的问题

    在使用k8s的HPA做弹性伸缩的时候,可能存在的号段被浪费的问题

    Is your feature request related to a problem? Please describe. 第一点,我所在的小庙,为了运维方便,使用k8s来维护生产环境的项目,且使用了HPA做弹性伸缩。 有些项目,存在这样的情况:没有人用的时候,一天都没有几个请求,一旦有人使用到业务高峰的时候,可能会有3k多的并发。庙里配备的运维人员又少,所以类似这样的项目,我们暂时采用k8s的HPA功能做弹性伸缩,事实上也有着很不错的表现。 然后cosid,号段链模式,将会有prefetchWorker线程,预取号段,被预取的号段,将会维护在服务的内存中,不会持久化(如果没有理解错的话)。我看了您的文档,并不怀疑cosid的性能。 但是可能在业务高峰的时候,k8s弹性伸缩,java服务的deployment多出很多个pod,然后这多个实例都预取了号段,且并发越大安全距离会越大,预取号段会越多,正常使用扛过高峰之后,k8s又会弹性伸缩移除掉很多pod。这些被移除的pod预取的号段,可能还没有使用,然后pod就没了,号段就浪费了,id就浪费了。实际存储在库里的id就可能会有较大的不连续。 但是其实我们庙里的业务量根本远远不可能将Long型的id用完,所以这里的号段浪费其实是可以容忍的。

    第二点,我所在的小庙有些业务要使用到bitset,之前好多项目使用的是雪花算法变种作为分布式id的解决方案。但是雪花算法对bitset的使用非常不友好,所以我考虑改用号段算法去实现分布式id,然后就查到了cosid这个项目。 在号段被浪费的情况下,bitset的长度可能会受到影响,消耗更多内存。即使我对bitset进行分片,也有可能因为号段中id的浪费,导致分片的bitset中存在大量0,和少量1的情况,造成内存的浪费。请问有没有什么优化的手段?

    Describe the solution you'd like 我阅读了cosid的文档,认为可以将号段步长“step”配置的小一点,安全距离"safe-distence"配置小一点,可以尽可能的减少号段和id的浪费。

    Describe alternatives you've considered 可不可以有一种新的预取号段的方式。现有cosid的prefetchWorker会自适应的改变安全距离“safe-distence”。 prefetchWorker自适应改变预取周期“prefetch-period”。并发越高,预取周期越短,然后安全距离固定。来实现?

    或者将使用号段和使用完毕号段的信息和时间持久化。每隔一段时间将那些比较古老的,没有使用过号段回收。但是这样会打破趋势递增的规则。

    Additional context

    good first issue 
    opened by telechow 4
  • IdSegmentDistributor是否可以对外扩展出一个listener,方便使用者自己扩展nextMaxId的存储?

    IdSegmentDistributor是否可以对外扩展出一个listener,方便使用者自己扩展nextMaxId的存储?

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    help wanted 
    opened by long172066912 3
  • spring-boot-starter 命名规范问题

    spring-boot-starter 命名规范问题

    • 官方命名空间(springboot 官方项目) 前缀:spring-boot-starter- 模式:spring-boot-starter-{模块名} 举例:spring-boot-starter-web、spring-boot-starter-jdbc
    • 自定义命名空间(非springboot 官方) 后缀:-spring-boot-starter 模式:{模块}-spring-boot-starter 举例:mybatis-spring-boot-starter
    enhancement 
    opened by fxbin 3
  • Update dependency me.ahoo.cosid:cosid-test to v2

    Update dependency me.ahoo.cosid:cosid-test to v2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | me.ahoo.cosid:cosid-test | 1.16.8 -> 2.0.0 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    Ahoo-Wang/CosId

    v2.0.0

    What's Changed

    • Merge updates from the latest main branch
    • Update dependency org.springframework.boot:spring-boot-dependencies to v3.0.0
    • Update dependency org.springframework.cloud:spring-cloud-dependencies to v2022.0.0-RC2

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.5...v2.0.0


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency me.ahoo.cosid:cosid-jdbc to v2

    Update dependency me.ahoo.cosid:cosid-jdbc to v2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | me.ahoo.cosid:cosid-jdbc | 1.16.8 -> 2.0.0 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    Ahoo-Wang/CosId

    v2.0.0

    What's Changed

    • Merge updates from the latest main branch
    • Update dependency org.springframework.boot:spring-boot-dependencies to v3.0.0
    • Update dependency org.springframework.cloud:spring-cloud-dependencies to v2022.0.0-RC2

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.5...v2.0.0


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • 使用redis模式为分发器,阿里云数据库Redis在初始化执行lua脚本的时候报脚本错误

    使用redis模式为分发器,阿里云数据库Redis在初始化执行lua脚本的时候报脚本错误

    Which version of CosId did you use?

    1.12.1

    Bug Report

    之前 单机、主从的redis都正常

    我们的测试环境使用的docker部署的单机的redis,线上和UAT环境使用的阿里云的云产品【云数据库Redis版】,集群5.0版本。当我们准备部署上阿里云上的时候服务启动的时候报了lua脚本执行错误。 如下:

    
    [2022-07-07 16:06:40.182] [INFO ] [SWTraceId - TID: N/A] [] [me.ahoo.cosid.spring.redis.SpringRedisMachineIdDistributor] - distributeRemote - instanceId:[InstanceId{instanceId=172.28.25.39:7, stable=false}] - machineBit:[10] @ namespace:[xxxx-service]. 
    [2022-07-07 16:06:40.300] [WARN ] [SWTraceId - TID: N/A] [] [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration$EmbeddedTomcat': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shareSnowflakeId' defined in class path resource [me/ahoo/cosid/spring/boot/starter/snowflake/CosIdSnowflakeAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [me.ahoo.cosid.snowflake.SnowflakeId]: Factory method 'shareSnowflakeId' threw exception; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array, and KEYS should not be in expression. channel: [id: 0x7f4f67ec, L:/172.28.25.39:43428 - R:r-bp1usnu4324n3247.redis.rds.aliyuncs.com/12.9.0.43:579] command: (EVAL), params: [[45, 45, 32, 105, 116, 99, 95, 105, 100, 120, ...], 1, [123, 112, 105, 109, 115, 45, 102, 105, 110, 97, ...], [49, 55, 50 
    , 46, 50, 56, 46, 50, 53, 46, ...], [49, 48, 50, 51], [49, 54, 53, 55, 49, 56, 49, 50, 48, 48, ...], [49, 54, 53, 55, 49, 56, 48, 57, 48, 48, ...]]; nested exception is org.redisson.client.RedisException: ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array, and KEYS should not be in expression. channel: [id: 0x7f4f67ec, L:/172.28.25.39:43428 - R:r-adsadsadsad.redis.rds.aliyuncs.com/12.9.0.1213:349] command: (EVAL), params: [[45, 45, 32, 105, 116, 99, 95, 105, 100, 120, ...], 1, [123, 112, 105, 109, 115, 45, 102, 105, 110, 97, ...], [49, 55, 50, 46, 50, 56, 46, 50, 53, 46, ...], [49, 48, 50, 51], [49, 54, 53, 55, 49, 56, 49, 50, 48, 48, ...], [49, 54, 53, 55, 49, 56, 48, 57, 48, 48, ...]] 
    [2022-07-07 16:06:40.345] [WARN ] [SWTraceId - TID: N/A] [] [org.springframework.context.annotation.CommonAnnotationBeanPostProcessor] - Destroy method on bean with name 'lifecycleBootstrap' threw an exception: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'redisClientFactory': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) 
    [2022-07-07 16:06:40.357] [INFO ] [SWTraceId - TID: N/A] [] [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener] - 
     
    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
    [2022-07-07 16:06:40.361] [ERROR] [SWTraceId - TID: N/A] [] [org.springframework.boot.SpringApplication] - Application run failed 
    
    
    

    Reason analyze (If you can)

    阿里云官网对其做了解释,是限制了lua脚本的一些调用规则https://help.aliyun.com/document_detail/92942.html?spm=5176.13910061.sslink.1.36426f0dV6cOrU image image

    image

    引用自:https://www.jianshu.com/p/6bd82d96ffcf

    已经测试过,可以通过控制台将script_check_enable修改为0解决,但是有没有说要对lua脚本做一些调整 符合它的限制的可能?

    good first issue question 
    opened by qinkangdeid 2
  • 这个版本的雪花跑批量循环生成测试第一个生成的ID不是有序步长递增的 而是从第二个开始才是递增的

    这个版本的雪花跑批量循环生成测试第一个生成的ID不是有序步长递增的 而是从第二个开始才是递增的

    Bug Report

    跑循环生成测试第一个生成的ID不是有序步长递增的,我跑的测试很简单 这个是为何?望解答 thanks. 我跑了很多次基本都是这个结果

    
        public static void main(String[] args) {
    
    //      epoch和 machineId做了修改  其他都是默认值    
            MillisecondSnowflakeId millisecondSnowflakeId = new MillisecondSnowflakeId(1577836800000L, 41, 10, 12, 3);
            for (int i = 0; i < 100; i++) {
                long generate = millisecondSnowflakeId.generate();
                System.out.println(generate);
            }
        }
    
    

    跑出来的结果是:

    # 第一个ID生成和第二个没有递增关系  从第二个开始 3 4 5一直往后才有递增关系
    
    321493968892211200 
    
    321493968896405504
    321493968896405505
    321493968896405506
    321493968896405507
    321493968896405508
    321493968900599808
    321493968900599809
    321493968900599810
    321493968900599811
    321493968900599812
    321493968900599813
    321493968900599814
    321493968900599815
    321493968900599816
    321493968900599817
    321493968900599818
    321493968900599819
    321493968900599820
    321493968900599821
    321493968900599822
    321493968900599823
    321493968900599824
    321493968900599825
    321493968900599826
    321493968900599827
    321493968900599828
    321493968900599829
    321493968900599830
    321493968900599831
    321493968900599832
    321493968900599833
    321493968900599834
    321493968900599835
    321493968900599836
    321493968900599837
    321493968900599838
    321493968900599839
    321493968900599840
    321493968900599841
    321493968900599842
    321493968900599843
    321493968900599844
    321493968904794112
    321493968904794113
    321493968904794114
    321493968904794115
    321493968904794116
    321493968904794117
    321493968904794118
    321493968904794119
    321493968904794120
    321493968904794121
    321493968904794122
    321493968904794123
    321493968904794124
    321493968904794125
    321493968904794126
    321493968904794127
    321493968904794128
    321493968904794129
    321493968904794130
    321493968904794131
    321493968904794132
    321493968904794133
    321493968904794134
    321493968904794135
    321493968904794136
    321493968904794137
    321493968904794138
    321493968904794139
    321493968904794140
    321493968904794141
    321493968904794142
    321493968904794143
    321493968908988416
    321493968908988417
    321493968908988418
    321493968908988419
    321493968908988420
    321493968908988421
    321493968908988422
    321493968908988423
    321493968908988424
    321493968908988425
    321493968908988426
    321493968908988427
    321493968908988428
    321493968908988429
    321493968908988430
    321493968908988431
    321493968908988432
    321493968908988433
    321493968908988434
    321493968908988435
    321493968908988436
    321493968908988437
    321493968908988438
    321493968908988439
    321493968908988440
    
    
    
    

    Which version of CosId did you use?

    1.12.0

    question 
    opened by qinkangdeid 2
  • Update vuepress monorepo to v1.9.8

    Update vuepress monorepo to v1.9.8

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @vuepress/plugin-back-to-top (source) | 1.9.7 -> 1.9.8 | age | adoption | passing | confidence | | @vuepress/plugin-google-analytics (source) | 1.9.7 -> 1.9.8 | age | adoption | passing | confidence | | @vuepress/plugin-medium-zoom (source) | 1.9.7 -> 1.9.8 | age | adoption | passing | confidence | | vuepress | 1.9.7 -> 1.9.8 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    vuejs/vuepress

    v1.9.8

    Compare Source

    Bug Fixes

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update dependency org.apache.shardingsphere:shardingsphere-sharding-core to v5.3.0

    Update dependency org.apache.shardingsphere:shardingsphere-sharding-core to v5.3.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.apache.shardingsphere:shardingsphere-sharding-core (source) | 5.2.1 -> 5.3.0 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    apache/shardingsphere

    v5.3.0

    Compare Source

    API Changes
    1. DistSQL: Refactor syntax API, please refer to the user manual
    2. Proxy: Change the configuration style of global rule, remove the exclamation mark
    3. Proxy: Allow zero-configuration startup, enable the default account root/root when there is no Authority configuration
    4. Proxy: Remove the default logback.xml and use API initialization
    5. JDBC: Remove the Spring configuration and use Driver + YAML configuration instead
    Enhancements
    1. DistSQL: New syntax REFRESH DATABASE METADATA, refresh logic database metadata
    2. Kernel: Support DistSQL REFRESH DATABASE METADATA to load configuration from the governance center and rebuild MetaDataContext
    3. Support postgresql/openGauss setting transaction isolation level
    4. Scaling: Increase inventory task progress update frequency
    5. Scaling: DATA_MATCH consistency check support breakpoint resume
    6. Scaling: Support drop consistency check job via DistSQL
    7. Scaling: Rename column from sharding_total_count to job_item_count in job list DistSQL response
    8. Scaling: Add sharding column in incremental task SQL to avoid broadcast routing
    9. Scaling: Sharding column could be updated when generating SQL
    10. Scaling: Improve column value reader for DATA_MATCH consistency check
    11. DistSQL: Encrypt DistSQL syntax optimization, support like query algorithm
    12. DistSQL: Add properties value check when REGISTER STORAGE UNIT
    13. DistSQL: Remove useless algorithms at the same time when DROP RULE
    14. DistSQL: EXPORT DATABASE CONFIGURATION supports broadcast tables
    15. DistSQL: REGISTER STORAGE UNIT supports heterogeneous data sources
    16. Encrypt: Support Encrypt LIKE feature
    17. Automatically start distributed transactions when executing DML statements across multiple shards
    18. Kernel: Support client \d for PostgreSQL and openGauss
    19. Kernel: Support select group by, order by statement when column contains null values
    20. Kernel: Support parse RETURNING clause of PostgreSQL/openGauss Insert
    21. Kernel: SQL HINT performance improvement
    22. Kernel: Support mysql case when then statement parse
    23. Kernel: Supporting data source level heterogeneous database gateway
    24. (Experimental) Sharding: Add sharding cache plugin
    25. Proxy: Support more PostgreSQL datetime formats
    26. Proxy: Support MySQL COM_RESET_CONNECTION
    27. Scaling: Improve MySQLBinlogEventType.valueOf to support unknown event type
    28. Kernel: Support case when for federation
    Bug Fix
    1. Scaling: Fix barrier node created at job deletion
    2. Scaling: Fix part of columns value might be ignored in DATA_MATCH consistency check
    3. Scaling: Fix jdbc url parameters are not updated in consistency check
    4. Scaling: Fix tables sharding algorithm type INLINE is case-sensitive
    5. Scaling: Fix incremental task on MySQL require mysql system database permission
    6. Proxy: Fix the NPE when executing select SQL without storage node
    7. Proxy: Support DATABASE_PERMITTED permission verification in unicast scenarios
    8. Kernel: Fix the wrong value of worker-id in show compute nodes
    9. Kernel: Fix route error when the number of readable data sources and weight configurations of the Weight algorithm are not equal
    10. Kernel: Fix multiple groups of readwrite-splitting refer to the same load balancer name, and the load balancer fails problem
    11. Kernel: Fix can not disable and enable compute node problem
    12. JDBC: Fix data source is closed in ShardingSphereDriver cluster mode when startup problem
    13. Kernel: Fix wrong rewrite result when part of logical table name of the binding table is consistent with the actual table name, and some are inconsistent
    14. Kernel: Fix startup exception when use SpringBoot without configuring rules
    15. Encrypt: Fix null pointer exception when Encrypt value is null
    16. Kernel: Fix oracle parsing does not support varchar2 specified type
    17. Kernel: Fix serial flag judgment error within the transaction
    18. Kernel: Fix cursor fetch error caused by wasNull change
    19. Kernel: Fix alter transaction rule error when refresh metadata
    20. Encrypt: Fix EncryptRule cast to TransparentRule exception that occurs when the call procedure statement is executed in the Encrypt scenario
    21. Encrypt: Fix exception which caused by ExpressionProjection in shorthand projection
    22. Proxy: Fix PostgreSQL Proxy int2 negative value decoding incorrect
    23. Proxy: PostgreSQL/openGauss support describe insert returning clause
    24. Proxy: Fix gsql 3.0 may be stuck when connecting Proxy
    25. Proxy: Fix parameters are missed when checking SQL in Proxy backend
    26. Proxy: Enable MySQL Proxy to encode large packets
    27. Kernel: Fix oracle parse comment without whitespace error
    28. DistSQL: Fix show create table for encrypt table
    Refactor
    1. Scaling: Reverse table name and column name when generating SQL if it's SQL keyword
    2. Scaling: Improve increamental task failure handling
    3. Kernel: Governance center node adjustment, unified hump to underscore
    Change Log
    1. MILESTONE

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency org.apache.shardingsphere:shardingsphere-sharding-api to v5.3.0

    Update dependency org.apache.shardingsphere:shardingsphere-sharding-api to v5.3.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.apache.shardingsphere:shardingsphere-sharding-api (source) | 5.2.1 -> 5.3.0 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    apache/shardingsphere

    v5.3.0

    Compare Source

    API Changes
    1. DistSQL: Refactor syntax API, please refer to the user manual
    2. Proxy: Change the configuration style of global rule, remove the exclamation mark
    3. Proxy: Allow zero-configuration startup, enable the default account root/root when there is no Authority configuration
    4. Proxy: Remove the default logback.xml and use API initialization
    5. JDBC: Remove the Spring configuration and use Driver + YAML configuration instead
    Enhancements
    1. DistSQL: New syntax REFRESH DATABASE METADATA, refresh logic database metadata
    2. Kernel: Support DistSQL REFRESH DATABASE METADATA to load configuration from the governance center and rebuild MetaDataContext
    3. Support postgresql/openGauss setting transaction isolation level
    4. Scaling: Increase inventory task progress update frequency
    5. Scaling: DATA_MATCH consistency check support breakpoint resume
    6. Scaling: Support drop consistency check job via DistSQL
    7. Scaling: Rename column from sharding_total_count to job_item_count in job list DistSQL response
    8. Scaling: Add sharding column in incremental task SQL to avoid broadcast routing
    9. Scaling: Sharding column could be updated when generating SQL
    10. Scaling: Improve column value reader for DATA_MATCH consistency check
    11. DistSQL: Encrypt DistSQL syntax optimization, support like query algorithm
    12. DistSQL: Add properties value check when REGISTER STORAGE UNIT
    13. DistSQL: Remove useless algorithms at the same time when DROP RULE
    14. DistSQL: EXPORT DATABASE CONFIGURATION supports broadcast tables
    15. DistSQL: REGISTER STORAGE UNIT supports heterogeneous data sources
    16. Encrypt: Support Encrypt LIKE feature
    17. Automatically start distributed transactions when executing DML statements across multiple shards
    18. Kernel: Support client \d for PostgreSQL and openGauss
    19. Kernel: Support select group by, order by statement when column contains null values
    20. Kernel: Support parse RETURNING clause of PostgreSQL/openGauss Insert
    21. Kernel: SQL HINT performance improvement
    22. Kernel: Support mysql case when then statement parse
    23. Kernel: Supporting data source level heterogeneous database gateway
    24. (Experimental) Sharding: Add sharding cache plugin
    25. Proxy: Support more PostgreSQL datetime formats
    26. Proxy: Support MySQL COM_RESET_CONNECTION
    27. Scaling: Improve MySQLBinlogEventType.valueOf to support unknown event type
    28. Kernel: Support case when for federation
    Bug Fix
    1. Scaling: Fix barrier node created at job deletion
    2. Scaling: Fix part of columns value might be ignored in DATA_MATCH consistency check
    3. Scaling: Fix jdbc url parameters are not updated in consistency check
    4. Scaling: Fix tables sharding algorithm type INLINE is case-sensitive
    5. Scaling: Fix incremental task on MySQL require mysql system database permission
    6. Proxy: Fix the NPE when executing select SQL without storage node
    7. Proxy: Support DATABASE_PERMITTED permission verification in unicast scenarios
    8. Kernel: Fix the wrong value of worker-id in show compute nodes
    9. Kernel: Fix route error when the number of readable data sources and weight configurations of the Weight algorithm are not equal
    10. Kernel: Fix multiple groups of readwrite-splitting refer to the same load balancer name, and the load balancer fails problem
    11. Kernel: Fix can not disable and enable compute node problem
    12. JDBC: Fix data source is closed in ShardingSphereDriver cluster mode when startup problem
    13. Kernel: Fix wrong rewrite result when part of logical table name of the binding table is consistent with the actual table name, and some are inconsistent
    14. Kernel: Fix startup exception when use SpringBoot without configuring rules
    15. Encrypt: Fix null pointer exception when Encrypt value is null
    16. Kernel: Fix oracle parsing does not support varchar2 specified type
    17. Kernel: Fix serial flag judgment error within the transaction
    18. Kernel: Fix cursor fetch error caused by wasNull change
    19. Kernel: Fix alter transaction rule error when refresh metadata
    20. Encrypt: Fix EncryptRule cast to TransparentRule exception that occurs when the call procedure statement is executed in the Encrypt scenario
    21. Encrypt: Fix exception which caused by ExpressionProjection in shorthand projection
    22. Proxy: Fix PostgreSQL Proxy int2 negative value decoding incorrect
    23. Proxy: PostgreSQL/openGauss support describe insert returning clause
    24. Proxy: Fix gsql 3.0 may be stuck when connecting Proxy
    25. Proxy: Fix parameters are missed when checking SQL in Proxy backend
    26. Proxy: Enable MySQL Proxy to encode large packets
    27. Kernel: Fix oracle parse comment without whitespace error
    28. DistSQL: Fix show create table for encrypt table
    Refactor
    1. Scaling: Reverse table name and column name when generating SQL if it's SQL keyword
    2. Scaling: Improve increamental task failure handling
    3. Kernel: Governance center node adjustment, unified hump to underscore
    Change Log
    1. MILESTONE

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • 是否可以支持Springboot3

    是否可以支持Springboot3

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    question dependency 
    opened by aozeyu 7
  • Update dependency com.google.guava:guava to v31

    Update dependency com.google.guava:guava to v31

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.guava:guava | 30.0-jre -> 31.1-jre | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
Releases(v2.0.5)
  • v2.0.5(Dec 23, 2022)

    What's Changed

    • Update dependency gradle to v7.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/217
    • Update dependency org.junit-pioneer:junit-pioneer to v1.9.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/222
    • Update dependency org.springframework.boot:spring-boot-dependencies to 3.0.1
    • Update dependency org.springframework.cloud:spring-cloud-dependencies to 2022.0.0
    • Update dependency org.mybatis.spring.boot:mybatis-spring-boot-starter to 3.0.1
    • Remove @Primary from shareSnowflakeId
    • change DEFAULT_NAMESPACE from {cosid} to cosid by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/223

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.0.0...v2.0.5

    Source code(tar.gz)
    Source code(zip)
  • v1.16.9(Dec 23, 2022)

    What's Changed

    • Update dependency org.springframework.boot:spring-boot-dependencies to v2.7.7 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/235

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.8...v1.16.9

    Source code(tar.gz)
    Source code(zip)
  • v1.16.8(Dec 15, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-test to v1.16.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/225
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.16.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/224
    • remove '@Primary' from shareSnowflakeId by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/228

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.6...v1.16.8

    Source code(tar.gz)
    Source code(zip)
  • v1.16.6(Dec 8, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.16.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/211
    • Update dependency me.ahoo.cosid:cosid-test to v1.16.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/212
    • Update dependency org.springframework.boot:spring-boot-dependencies to v2.7.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/213
    • Update dependency gradle to v7.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/217
    • Update dependency org.junit-pioneer:junit-pioneer to v1.9.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/222
    • Update dependency org.mybatis.spring.boot:mybatis-spring-boot-starter to v2.3.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/219
    • change DEFAULT_NAMESPACE from {cosid} to cosid by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/223

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.5...v1.16.6

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Nov 25, 2022)

    What's Changed

    • Merge updates from the latest main branch
    • Update dependency org.springframework.boot:spring-boot-dependencies to v3.0.0
    • Update dependency org.springframework.cloud:spring-cloud-dependencies to v2022.0.0-RC2

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.5...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.16.5(Nov 23, 2022)

    What's Changed

    • Update dependency org.springframework.cloud:spring-cloud-dependencies to v2021.0.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/193
    • Update dependency org.junit-pioneer:junit-pioneer to v1.8.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/199
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.16.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/203
    • Update dependency me.ahoo.cosid:cosid-test to v1.16.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/204
    • refactor unit test for MachineStateStorage by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/205
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.36 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/207
    • Update dependency org.openjdk.jmh:jmh-core to v1.36 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/206
    • Update dependency org.junit-pioneer:junit-pioneer to v1.9.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/208
    • Update dependency org.testcontainers:testcontainers-bom to v1.17.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/209
    • use org.springframework.boot.autoconfigure.AutoConfiguration.imports instead spring.factories. by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/210

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.2...v1.16.5

    Source code(tar.gz)
    Source code(zip)
  • v1.16.2(Nov 12, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-test to v1.16.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/198
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.16.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/197
    • refactor log level for InMemoryMachineStateStorage by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/201
    • Improve code coverage by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/202

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.16.0...v1.16.2

    Source code(tar.gz)
    Source code(zip)
  • v1.16.0(Nov 10, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.15.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/188
    • Update dependency me.ahoo.cosid:cosid-test to v1.15.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/189
    • Update dependency org.axonframework:axon-bom to v4.6.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/194
    • Update dependency org.junit-pioneer:junit-pioneer to v1.7.2 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/195
    • Modify the MachineId type to Int by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/196

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.15.2...v1.16.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-SNAPSHOT(Oct 28, 2022)

    What's Changed

    • Update dependency org.springframework.boot:spring-boot-dependencies to 3.0.0-RC1 #187
    • Update dependency org.springframework.cloud:spring-cloud-dependencies to 2022.0.0-M5
    • Upgrade to Java 17 (Spring boot 3 requires Java 17)

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.15.2...v2.0.0-SNAPSHOT

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-RC1(Oct 28, 2022)

  • v1.15.2(Oct 28, 2022)

    What's Changed

    • Update dependency com.squareup.okhttp3:okhttp-bom to v4.10.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/175
    • Update dependency org.axonframework:axon-bom to v4.6.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/180
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.15.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/181
    • Update dependency me.ahoo.cosid:cosid-test to v1.15.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/182
    • Update dependency org.junit-pioneer:junit-pioneer to v1.7.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/183
    • Update dependency org.springframework.boot:spring-boot-dependencies to v2.7.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/184
    • Update dependency org.apache.shardingsphere:shardingsphere-sharding-core to v5.2.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/179
    • Update dependency org.apache.shardingsphere:shardingsphere-sharding-api to v5.2.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/178
    • Update dependency org.apache.shardingsphere:shardingsphere-jdbc-core-spring-boot-starter to v5.2.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/177
    • Fix compatibility issue with shardingsphere v5.2.1

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.15.0...v1.15.2

    Source code(tar.gz)
    Source code(zip)
  • v1.15.0(Oct 27, 2022)

    What's Changed

    • Update junit5 monorepo to v5.9.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/157
    • Update dependency org.mybatis:mybatis to v3.5.11 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/170
    • Update dependency org.projectlombok:lombok to v1.18.24 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/171
    • Update dependency me.ahoo.cosid:cosid-test to v1.14.9 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/173
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.14.9 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/172
    • Enhance non-null check by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/176

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.9...v1.15.0

    Source code(tar.gz)
    Source code(zip)
  • v1.14.9(Oct 27, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.14.8 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/163
    • Update dependency me.ahoo.cosid:cosid-test to v1.14.8 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/164
    • Update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v5.0.13 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/165
    • Update dependency mysql:mysql-connector-java to v8.0.31 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/166
    • Refactor Dependency management by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/169
    • Fix issues(https://github.com/Ahoo-Wang/CosId/issues/168) caused by MapperMethod.ParamMap.get constraints

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.8...v1.14.9

    Source code(tar.gz)
    Source code(zip)
  • v1.14.8(Oct 14, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.14.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/153
    • Update dependency me.ahoo.cosid:cosid-test to v1.14.6 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/154
    • Update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v5.0.12 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/156
    • Update dependency me.champeau.jmh:jmh-gradle-plugin to v0.6.8 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/158
    • Update plugin me.champeau.jmh to v0.6.8 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/159
    • Update openjdk Docker tag to v17.0.2-jdk-slim by @renovate in https://github.com/Ahoo-Wang/CosId/pull/160
    • Fix time unit offset calculation error: #161 by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/162

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.6...v1.14.8

    Source code(tar.gz)
    Source code(zip)
  • v1.14.6(Aug 30, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.14.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/149
    • Update dependency me.ahoo.cosid:cosid-test to v1.14.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/150
    • Update dependency me.champeau.jmh:jmh-gradle-plugin to v0.6.7 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/151
    • Update plugin me.champeau.jmh to v0.6.7 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/152
    • Fix wrong machine Id assignment for CosIdGeneratorAutoConfiguration

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.5...v1.14.6

    Source code(tar.gz)
    Source code(zip)
  • v1.14.5(Aug 29, 2022)

    What's Changed

    • Refactor MachineStateStorage AutoConfiguration
    • Remove MachineProperties.StateStorage.enabled
    • Fix some expired documents

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.4...v1.14.5

    Source code(tar.gz)
    Source code(zip)
  • v1.14.4(Aug 26, 2022)

    What's Changed

    • Update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v5.0.10 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/146
    • Refactor: CosIdIntervalShardingAlgorithm to support more date type:
      • java.time.Instant
      • java.time.LocalDate
      • java.time.OffsetDateTime
      • java.time.ZonedDateTime
      • java.time.LocalDateTime
      • java.time.YearMonth
      • java.sql.Date
      • java.sql.Timestamp
    • Improve code coverage: Test Snowflake Algorithm Modulo Uniformity
    • Split CosIdGenerator machine ID configuration
    • Refactor guardRemote log level to DEBUG
    • fix https://github.com/Ahoo-Wang/CosId/issues/133

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.3...v1.14.4

    Source code(tar.gz)
    Source code(zip)
  • v1.14.3(Aug 17, 2022)

    What's Changed

    • Refactor log readability
    • Refactor RadixCosIdStateParser

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.2...v1.14.3

    Source code(tar.gz)
    Source code(zip)
  • v1.14.2(Aug 15, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.14.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/139
    • Update dependency me.ahoo.cosid:cosid-test to v1.14.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/140
    • Refactor ConditionalOnCosIdGeneratorEnabled default to false

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.1...v1.14.2

    Source code(tar.gz)
    Source code(zip)
  • v1.14.1(Aug 11, 2022)

    What's Changed

    • add Radix36CosIdGenerator to support case-insensitive storage.
    • fix #135

    Radix62CosIdGenerator

            //0TEXPEbg0001001
            String id = radix62CosIdGenerator.generateAsString(); 
            //CosIdState{timestamp=1660526325024, machineId=1, sequence=1}
            CosIdState cosIdState = radix62CosIdGenerator.getStateParser().asState(id);
    

    Radix36CosIdGenerator

            //0L6U2PAD600010001
            String id = radix36CosIdGenerator.generateAsString(); 
            //CosIdState{timestamp=1660526664378, machineId=1, sequence=1}
            CosIdState cosIdState = radix36CosIdGenerator.getStateParser().asState(id);
    

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.14.0...v1.14.1

    Source code(tar.gz)
    Source code(zip)
  • v1.14.0(Aug 11, 2022)

    What's Changed

    • New distributed ID algorithm: CosIdGenerator by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/136
      • Global trend increasing.
      • Local monotonically increasing.
      • High performance: 15,570,085 ops/s (generateAsString), three times that of UUID.randomUUID().
      • Reverse parsing ID State (timestamp,machineId,sequence)
      • Easy to expand.
      • Small footprint: 15 Chars.

    CosIdGenerator

    • Refactor : Add sequenceResetThreshold to optimize the problem of uneven sharding of snowflake algorithm in the case of low system throughput.

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.13.1...v1.14.0

    Source code(tar.gz)
    Source code(zip)
  • v1.13.1(Aug 4, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.13.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/124
    • Update dependency me.ahoo.cosid:cosid-test to v1.13.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/125
    • Update dependency gradle to v7.5 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/126
    • Update junit5 monorepo to v5.9.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/128
    • Update dependency mysql:mysql-connector-java to v8.0.30 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/127
    • Fix #129

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.13.0...v1.13.1

    Source code(tar.gz)
    Source code(zip)
  • v1.13.0(Jul 12, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-test to v1.12.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/119
    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.12.1 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/118
    • Support CI for CosId-Proxy by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/121
    • Move the MachineIdDistributor to the top-level namespace by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/123

    Backward Incompatible Changes

    cosid:
      namespace: ${spring.application.name}
      machine:
        enabled: true
        distributor:
          type: redis
      snowflake:
        enabled: true
    

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.12.1...v1.13.0

    Source code(tar.gz)
    Source code(zip)
  • v1.12.1(Jun 14, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.12.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/98
    • Update dependency me.ahoo.cosid:cosid-test to v1.12.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/99
    • add UncertaintyIdGenerator by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/117 , For the following usage scenarios:
      • The problem of uneven sharding of snowflake IDs.
      • Don’t want the generated ID to be predictable, such as preventing crawler by ID number, predicting transaction volume.

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.12.0...v1.12.1

    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(May 25, 2022)

    What's Changed

    • Upgrade to Spring-Boot 2.6.8
    • Upgrade to Spring-Cloud 2021.0.2

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.11.0...v1.12.0

    Source code(tar.gz)
    Source code(zip)
  • v1.11.0(May 25, 2022)

    What's Changed

    • Add cosid-axon module to support IdentifierFactory of AxonFramework by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/108
    • Upgrade okhttp to 4.9.3 .

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.10.4...v1.11.0

    Source code(tar.gz)
    Source code(zip)
  • v1.10.4(May 22, 2022)

    What's Changed

    • enhance: add SuffixIdConverter .
    • enhance: support config IdConverterDefinition#suffix .
    • refactor: remove unnecessary dependencies .
    • refactor: enhance code robustness for cosid-proxy .

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.10.3...v1.10.4

    Source code(tar.gz)
    Source code(zip)
  • v1.10.3(May 20, 2022)

  • v1.10.2(May 18, 2022)

    What's Changed

    • Update dependency me.ahoo.cosid:cosid-jdbc to v1.10.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/89
    • Update dependency me.ahoo.cosid:cosid-test to v1.10.0 by @renovate in https://github.com/Ahoo-Wang/CosId/pull/90
    • make machineId guarder enabled default true by @RocherKong in https://github.com/Ahoo-Wang/CosId/pull/93
    • fix segmentAutoConfiguration bug #94

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.10.0...v1.10.2

    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(May 11, 2022)

    What's Changed

    • Enhance: add cosid-proxy module by @Ahoo-Wang in https://github.com/Ahoo-Wang/CosId/pull/87
    • Enhance: add cosid-proxy-server module CosId-Proxy
    • Refactor MachineIdDistributor to support cosid-proxy mode.
    • Split example to improve the experience of getting started.

    Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.9.0...v1.10.0

    Source code(tar.gz)
    Source code(zip)
Owner
Ahoo Wang
Lifelong learner! Love C# , Java , Go , Python , Kubernetes , BigData .
Ahoo Wang
OpenApi Generator - REST Client Generator

Quarkus - Openapi Generator Welcome to Quarkiverse! Congratulations and thank you for creating a new Quarkus extension project in Quarkiverse! Feel fr

Quarkiverse Hub 46 Jan 3, 2023
Distributed id generator application

Java distributed Unique ID generator inspired by Twitter snowflake You can read about Twitter snowflake here. The IDs are 64-bits in size and are gene

Mert Aksu 6 Oct 21, 2021
A Universal Resolver driver for did:dns identifiers.

Universal Resolver Driver: did:dns This is a Universal Resolver driver for did:dns identifiers. Specifications Decentralized Identifiers DID Method Sp

Danube Tech 0 Dec 14, 2022
Frogsoft CMS - Universal SaaS Content Management System

Frogsoft CMS Frogsoft CMS - Universal SaaS Content Management System 文档和代码正在完善中...... 未校对的开发规范文档、项目报告和测试报告等在 docs 目录下可供查阅(包括 ./docs/、./backend/docs、./

Frog Software 9 Aug 30, 2022
Auto-Unit-Test-Case-Generator automatically generates high-level code-coverage JUnit test suites for Java, widely used within the ANT Group.

中文README传送门 What is Auto-Unit-Test-Case-Generator Auto-Unit-Test-Case-Generator generates JUnit test suites for Java class just as its name. During te

TRaaS 108 Dec 22, 2022
PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

中文文档 What is PolarDB-X ? PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage and complex querying scen

null 1.2k Dec 31, 2022
Powerful and flexible library for loading, caching and displaying images on Android.

Universal Image Loader The great ancestor of modern image-loading libraries :) UIL aims to provide a powerful, flexible and highly customizable instru

Sergey Tarasevich 16.8k Jan 2, 2023
BRVAH:Powerful and flexible RecyclerAdapter

BRVAH http://www.recyclerview.org/ Powerful and flexible RecyclerView Adapter, Please feel free to use this. (Welcome to Star and Fork) 强大而灵活的Recycler

陈宇明 23.3k Jan 4, 2023
An extremely flexible yet vanilla-esque multiblock mod, that embraces aspects of MultiblockTweaker and Modular Machinery.

Multiblocked Multiblocked (mbd) is an extremely flexible yet vanilla-esque multiblock mod, that embraces aspects of MultiblockTweaker and Modular Mach

Cleanroom 36 Jan 4, 2023
A lazily evaluated, functional, flexible and concise Lisp.

KamilaLisp A lazily evaluated, functional, flexible and concise Lisp modelled after Haskell and APL, among others. ;; Hello, world! (println "Hello, w

Kamila Szewczyk 42 Dec 15, 2022
Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Everyone can develop projects independently, quickly and efficiently! What is spring-boot-plus? A easy-to-use, high-speed, high-efficient, feature-ric

geekidea 2.3k Dec 31, 2022
High performance RPC framework based on netty

RPC(Remote Procedure Call)实战 @desc: 仅用于个人学习、了解RPC @date: 2021/01/16 技术组成: 版本一 版本二 版本三 传输层 Netty4 * * 编码层 Kryo * * 应用层 JDK动态代理 * * 服务注册与发现 手动注册+guava缓存

XDD 10 Nov 22, 2022
✈A high-performance RPC based on Java & Netty.

bRPC README 中文版本 一个基于netty的RPC框架 基于netty NIO、IO多路复用。 client与server端建立心跳包保活机制。发生未知断连时,重连保证可靠长连接。 使用kryo序列化,自定义传输包,及传输格式,避免TCP沾包问题。 支持zookeeper或nacos做服务

vincent 238 Dec 16, 2022
Clivia is a scalable, high-performance, elastic and responsive API gateway based on spring weblux

clivia是一款基于spring webflux的可扩展、高性能、高弹性、响应式的 API 网关 clivia_V0.0.1 架构概览 模块介绍 clivia-admin-core : 网关配置管理后台核心模块 clivia-client-core : 网关核心模块 clivia-example

palading 14 Jan 9, 2023
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!

Introduction ActiveJ is a full-featured modern Java platform, created from the ground up as an alternative to Spring/Micronauts/Netty/Jetty. It is des

ActiveJ LLC 579 Jan 7, 2023
Asynchronous, high-performance Minecraft Hologram library for 1.8-1.18 servers.

Hologram-Lib Asynchronous, high-performance Minecraft Hologram library for 1.8-1.18 servers. Requirements This library can only be used on spigot serv

null 45 Dec 20, 2022
High Performance data structures and utility methods for Java

Agrona Agrona provides a library of data structures and utility methods that are a common need when building high-performance applications in Java. Ma

Real Logic 2.5k Jan 7, 2023
ShenYu is High-Performance Java API Gateway.

Scalable, High Performance, Responsive API Gateway Solution for all MicroServices https://shenyu.apache.org/ English | 简体中文 Architecture Features Shen

The Apache Software Foundation 7.5k Jan 4, 2023
A modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue.

What is Shopfly? Shopfly is modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue. Architecture Shopfly i

Shopfly 31 Jul 17, 2022