code: func (s *schemaVersionSyncer) MustGetGlobalVersion(ctx context.Context) (int64, error) {
  	startTime := time.Now()
  	var (
  		err  error
  		ver  int
  		resp *clientv3.GetResponse
  	)
  	failedCnt := 0
  	intervalCnt := int(time.Second / keyOpRetryInterval)
  
  	defer func() {
  		metrics.OwnerHandleSyncerHistogram.WithLabelValues(metrics.OwnerGetGlobalVersion, metrics.RetLabel(err)).Observe(time.Since(startTime).Seconds())
  	}()
  	for {
  		if err != nil {
  			if failedCnt%intervalCnt == 0 {
  				logutil.Logger(ddlLogCtx).Info("[ddl] syncer get global version failed", zap.Error(err))
  			}
  			time.Sleep(keyOpRetryInterval)
  			failedCnt++
  		}
  
  		if isContextDone(ctx) {
  			err = errors.Trace(ctx.Err())
  			return 0, err
  		}
  
  		resp, err = s.etcdCli.Get(ctx, DDLGlobalSchemaVersion)
  		if err != nil {
  			continue
  		}
  		if len(resp.Kvs) > 0 {
  			ver, err = strconv.Atoi(string(resp.Kvs[0].Value))
  			if err == nil {
  				return int64(ver), nil
  			}
  		}
  	}
  }
docs: // MustGetGlobalVersion implements SchemaSyncer.MustGetGlobalVersion interface.