Skip to content

功能性严重bug #5

@wu560130911

Description

@wu560130911

https://github.com/zhuzhong/idleaf/blob/master/src/main/java/com/zhuzhong/idleaf/support/MysqlIdLeafServiceImpl.java
此类实现存在严重功能性bug。
1、ReentrantLock为什么定义成静态的?全局共用一把锁?
2、AtomicLong的引用经常被改变,多线程读取的时候确定没有问题?
3、currentId.longValue()无法保证多线程下,不同代码行拿到的数据一致性。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions