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
Although we have fixed #3128, when we upgrade from a lower PD version to a higher one, TiDB still cannot add gc_worker key in PD because PD won't accept a smaller safe-ttl.
This will make UpdateGCSafePoint keep responding wrong safe point value which may cause some problems to the client who uses this interface, for example, TiCDC.
Solution:
PD should check whether do PD has 'gc_worker' key in etcd key. If not, we should create one and set it to current min safePoint. It's safe because TiDB will always try to update this key when it trys to do a GC job.
We should have a better overflow check instead of this:
When we set TTL to a big value instead of math.MaxInt64, this code will still form a negative ExpiredAt value. I think check now.Unix() with math.MaxInt64-request.TTL will simply fix this problem. When it's true, we can just set ExpiredAt to math.MaxInt64.
I see. I did a fix for the gc_worker in #3146 but it doesn't work for upgraded cluster where there exists other alive service safepoints. If other safepoints are deleted before gc_worker's safepoint being successfully written, it's still possible that a regressing safepoint is incorrectly accepted.
Thanks for reporting. I'll fix it later today or tomorrow.
Bug Report
An extended problem of #3128
What did you do?
Upgrade from PD from v4.0.8 to v4.0.9.
What did you expect to see?
PD should contain service_gc_safe_points
gc_worker
in PD etcd key.Expected:
What did you see instead?
service_id: "gc_worker" is still lost.
What version of PD are you using (
pd-server -V
)?The text was updated successfully, but these errors were encountered: