和顺 / 衡律 返回所属 Agent
23.10

灾备恢复与运行重新开放

原能力

按恢复计划重建检查点、消息和账务,隔离旧写者并查证原请求后再开放。(合同附件 R7 23.10)

首选项目

Velero(Apache-2.0)。 Velero

匹配范围

卷和集群恢复、持久任务继续运行。

源码

Velero · func (r *restoreReconciler) Reconcile(

pkg/controller/restore_controller.go · 179–192 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
func (r *restoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
	// Developer note: any error returned by this method will
	// cause the restore to be re-enqueued and re-processed by
	// the controller.
	log := r.logger.WithField("Restore", req.NamespacedName.String())

	restore := &api.Restore{}
	err := r.kbClient.Get(ctx, client.ObjectKey{Namespace: req.Namespace, Name: req.Name}, restore)
	if err != nil {
		if apierrors.IsNotFound(err) {
			log.Debugf("restore[%s] not found", req.Name)
			return ctrl.Result{}, nil
		}
  • Copyright The Velero Contributors.

Temporal Python SDK · async def wait_condition(

temporalio/workflow/_context.py · 1028–1041 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
async def wait_condition(
    fn: Callable[[], bool],
    *,
    timeout: timedelta | float | None = None,
    timeout_summary: str | None = None,
    event_groups: Sequence[EventGroup] | None = None,
) -> None:
    """Wait on a callback to become true.

    This function returns when the callback returns true (invoked each loop
    iteration) or the timeout has been reached.

    Importantly, using `None` value for ``timeout`` means that no Temporal timer is created. This
    means changing from `None` to a positive value (or the inverse) constitutes a nondeterministic

实现与验收要点

数据完整、业务对账、正式重新开放与具名确认。