Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimpl psyncer #234

Merged
merged 8 commits into from
Nov 18, 2022
Merged

Reimpl psyncer #234

merged 8 commits into from
Nov 18, 2022

Conversation

cmcater
Copy link
Contributor

@cmcater cmcater commented Nov 17, 2022

No description provided.

Data interface{}
Id string
TaskId string
TaskId string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to handle the result with out Data?

taskdone chan struct{}
stopnotify chan struct{}

taskGenerators map[TaskType]func(args ...interface{}) (*SyncTask, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use sync.map to avoid race condition?

IDLE = 3
LOCAL_SYNCING = 4
CLOSE = 5
IDLE = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the index start from 1?

time.Sleep(time.Duration(v) * time.Millisecond) // add some random delay
if sr.rumExchangeTestMode == false && sr.syncNetworkType == conn.PubSub {
//Commented by cuicat
//?? Do we need this in "real" network environment??
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to add the random delay to avoid be QOS by remote peers.

@huo-ju huo-ju merged commit ed60628 into producer_sync Nov 18, 2022
@huo-ju huo-ju deleted the reimpl_psyncer branch December 29, 2022 01:20
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.

2 participants