-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
replicas ttl are possibly different #864
Comments
|
According to replicas logic and codes, when writting a file, ttl can be set in url (e.g. ttl=1m) the 1st written one(aka needle) has the ttl property, others has no needle ttl property
if different volumes run on different machines, not sync-ing time by ntp, the replica volume's lastModifiedTime will be set same to the main volume server's, it also causes ambiguity. e.g. 2 replicas: ttl = 5m when write file in volume-0 at 2019-02-27T00:00:00.000Z, then write replica on volume-1, last modifed time of volume-1 will also be set as ts=2019-02-27T00:00:00.000Z, then after 1m volume-1 will be removed. |
|
ok, that is to say seaweedfs depends on ntp. q := url.Values{
"type": {"replicate"},
"ttl": {needle.Ttl.String()},
}
if needle.LastModified > 0 {
q.Set("ts", strconv.FormatUint(needle.LastModified, 10))
} |
this change should be good. |
Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs
Describe the bug
ReplicatedWrite do NOT fill ttl paramemter so ttl of replicas is possibly different with the first written one, in light of the following codes
https://github.com/chrislusf/seaweedfs/blob/344caf3cd7d2de00469a61ae3bf597b8e9bab726/weed/topology/store_replicate.go#L48
And setting ts when replicatedWrite makes volume servers strongly depend on ntp
https://github.com/chrislusf/seaweedfs/blob/344caf3cd7d2de00469a61ae3bf597b8e9bab726/weed/topology/store_replicate.go#L52
Expected behavior
The text was updated successfully, but these errors were encountered: