Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 authored and ti-chi-bot committed Mar 11, 2023
1 parent f12d51a commit be03c3b
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,17 @@ case class ServiceSafePoint(
}

def stopRegisterSafePoint(): Unit = {
minStartTs = Long.MaxValue
clientSession.getTiKVSession.getPDClient.updateServiceGCSafePoint(
serviceId,
ttl,
Long.MaxValue,
ConcreteBackOffer.newCustomBackOff(PD_UPDATE_SAFE_POINT_BACKOFF))
service.shutdownNow()
try {
minStartTs = Long.MaxValue
clientSession.getTiKVSession.getPDClient.updateServiceGCSafePoint(
serviceId,
ttl,
Long.MaxValue,
ConcreteBackOffer.newCustomBackOff(PD_UPDATE_SAFE_POINT_BACKOFF))
} catch {
case e: Exception => logger.error("Failed to stop register service GC safe point", e)
} finally {
service.shutdownNow()
}
}
}

0 comments on commit be03c3b

Please sign in to comment.