Skip to content

Conversation

LXPWing
Copy link
Owner

@LXPWing LXPWing commented Jul 14, 2021

1.在JDBC模块中复制DefaultCommonConfigBean、MetadataConfigBean、MetaElectorConfigBean,然后在RaftConfiguration配置类中注入三者。
2.在RaftConfiguration配置类中注入RheaKVStore(通过 @ConditionalOnMissingBean判断用户是否注入RheaKVStore,如果没有自动注入,启动我定义好的RheaKVStore)
3.新增DefaultConfigs(DB_PATH,RAFT_DATA_PATH,ADDRESS,CLUSTER_NAME)
4.新增LeaderLockDomain(lockName(分布式锁名称),dataCenter(集群名称),owner(节点名称),leaderInfo(节点信息),gmtModified(修改时间),duration(过期时间))
5.新增AppRevisionDomain(dataCenter(集群节点 ,revision(revision),appName(应用名),clientVersion(客户端版本),baseParams(基础参数),serviceParams(服务参数),gmtModify(修改时间))
6.在MetaRaftLeaderElector中的JRheaKV存储("DISTRIBUTE-LOCk",Map<String, LeaderLockDomain>
7.Map<String, LeaderLockDomain> leaderInfoMap = new ConcurrentHashMap<>(),表示Map<集群节点,节点信息>

LXPWing added 5 commits July 12, 2021 23:11
…figBean,然后在RaftConfiguration配置类中注入三者。

2.在RaftConfiguration配置类中注入RheaKVStore(通过 @ConditionalOnMissingBean判断用户是否注入RheaKVStore,如果没有自动注入,启动我定义好的RheaKVStore)
3.新增DefaultConfigs(DB_PATH,RAFT_DATA_PATH,ADDRESS,CLUSTER_NAME)
4.新增LeaderLockDomain(lockName(分布式锁名称),dataCenter(集群名称),owner(节点名称),leaderInfo(节点信息),gmtModified(修改时间),duration(过期时间))
5.新增AppRevisionDomain(dataCenter(集群节点 ,revision(revision),appName(应用名),clientVersion(客户端版本),baseParams(基础参数),serviceParams(服务参数),gmtModify(修改时间))
6.在MetaRaftLeaderElector中的JRheaKV存储("DISTRIBUTE-LOCk",Map<String, LeaderLockDomain>
7.Map<String, LeaderLockDomain> leaderInfoMap = new ConcurrentHashMap<>(),表示Map<集群节点,节点信息>
2.修改LeaderLockDomain类的属性(原: 替换LeaderInfo类 ,现:改为epoch,leader,expireTimestamp属性,LeaderLockDomain类继承Serializable接口)。
3.修改InterfaceAppsDomain类的属性(原: 替换interfaceMapping类,现:改为nanosVersion,apps属性,InterfaceAppsDomain类继承Serializable接口)。
4.增加ProvideDataRaftRepository类
5.增加AppRevisionRaftRepositoryTest类,
(1)测试AppRevisionRaftRepository类中的register,queryRevisionrefresh,heartbeat,invalidateHeartbeat,getHeartbeatSet方法。
(2)测试 AppRevisionHeartbeatRaftRepository类中的doHeartbeatCacheChecker,doAppRevisionGc方法。
6.增加InterfaceAppsRaftRepositoryTest类,测试InterfaceAppsRaftRepository类中的getAppNames方法。
7.增加ProvideDataRaftRepositoryTest类,测试ProvideDataRaftRepository类中的put,remove,getAll方法。
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

Successfully merging this pull request may close these issues.

1 participant