Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Lightning sets empty string as service ID for UpdateServiceGCSafePoint API #458

Closed
MyonKeminta opened this issue Nov 9, 2020 · 0 comments · Fixed by #460
Closed

Lightning sets empty string as service ID for UpdateServiceGCSafePoint API #458

MyonKeminta opened this issue Nov 9, 2020 · 0 comments · Fixed by #460
Assignees
Labels
severity/moderate type/bug This issue is a bug report

Comments

@MyonKeminta
Copy link

MyonKeminta commented Nov 9, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

Submitted a PR in PD's repo which added non-empty check for service ID in UpdateServiceGCSafePoint API: tikv/pd#3146

  1. What did you expect to see?

Everything works well

  1. What did you see instead?

CI failed at lightning test because lightning sets empty string as the service ID when invoking UpdaetServiceGCSafePoint

[2020-11-09T07:30:13.887Z] tidb lightning encountered error:  restore table `alter_random`.`t` failed: rpc error: code = Unknown desc = service id of service safepoint cannot be empty.

And I read the code. It invokes the API here:

_, err = m.pdClient.UpdateServiceGCSafePoint(ctx,
m.serviceID, serviceSafePointTTL, ts)

and m.serviceID seems never set.

By the way, it also didn't check the return value of UpdateServiceGCSafePoint, which is useful for checking whether the actual GC safepoint has already exceeded the current set value. Please consider check it.

  1. Versions of the cluster

    It occurs in CI and doesn't have detailed version info.

    • TiDB-Lightning version (run tidb-lightning -V):

      master
      
    • TiKV-Importer version (run tikv-importer -V)

      master
      
    • TiKV version (run tikv-server -V):

      master
      
    • TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

      master
      
    • Other interesting information (system version, hardware config, etc):

      The issue may also exist in 4.0 branch.

  2. Operation logs

    • No need
  3. Configuration of the cluster and the task

    • No need
  4. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus for TiDB-Lightning if possible

    • No need
@MyonKeminta MyonKeminta added the type/bug This issue is a bug report label Nov 9, 2020
@glorv glorv self-assigned this Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity/moderate type/bug This issue is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants