CHECK ALL TABLET SEGMENT LOST

There may be some exceptions that cause segment to be lost on BE node. However, the metadata shows that the tablet is normal. This abnormal replica is not detected by FE and cannot be automatically repaired. When query comes, exception information is thrown that failed to initialize storage reader. The function of this interface is to check all tablets on the current BE node that have lost segment.

  1. curl -X POST http://be_host:webserver_port/api/check_tablet_segment_lost?repair=xxx

When parameter repair is set to true, tablets with lost segment will be set to SHUTDOWN status and treated as bad replica, which can be detected and repaired by FE. Otherwise, all tablets with missing segment are returned and nothing is done.

The return is all tablets on the current BE node that have lost segment:

  1. {
  2. status: "Success",
  3. msg: "Succeed to check all tablet segment",
  4. num: 3,
  5. bad_tablets: [
  6. 11190,
  7. 11210,
  8. 11216
  9. ],
  10. set_bad: true,
  11. host: "172.3.0.101"
  12. }