Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
XiaWei321
DistributedDatabase
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Home
Jump to bottom
XiaWei321 edited this page
Apr 26, 2019
·
1 revision
See More
待解决的问题:
如何判断本节点的文件和别的节点的文件不同,如果每个节点的文件都不相同同步的时候肯定会出现大量的冲突:模仿git 的diff算法,如果两个文件存在差异,测通过diff算法进行合并。合并的时候暂时不去重,因为如果指令是清除指令那么如果对清除指令去重的话可可能数据会出现错误,比如aof文件如下:ABDEFD和ABDEF数据就会不一致(D为清除指令)。到后期验证一下ABDEFD去重为ABEFD这种类型看看有没有其他问题。
所有文件都同步之后为了避免在区块链发送大量的消息,肯定在所有的文件都同步之后渐渐降低同步的频率:对应解决策略为每个节点只有当自己的aof文件发生变化时才发起同步交易,该做法可以使得当所以文件都同步完成之后区块链当中就没有交易存在,只有当某个或者某些节点的aof文件发生变化后才会重新发起同步交易
如何查询
要考虑吧已经同步过的交易给丢弃掉,不能多次同步:当前我们暂时每个节点只发送一次同步交易,也就是忽略因为网络造成的交易的丢失,如果实在要写的话可以写一个类似于TCP的协议。 5. 进行aof文件替换的时候要阻塞redis进程,只允许查询redis,不允许写操作,写操作会暂时缓存到某一个消息队列当中(例如kafka)。
Wiki pages
Pages
1
Loading
Home
Clone this wiki locally
You can’t perform that action at this time.