Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-35859

[flink-cdc] Fix: The assigner is not ready to offer finished split information, this should not be called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • cdc-3.1.1
    • cdc-3.2.0
    • Flink CDC
    • None

    Description

      When use CDC with newly added table,  an error occurs: 

      The assigner is not ready to offer finished split information, this should not be called. 

      It's because:
      1. when stop then restart the job , the status is NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED.
       
      2. Then Enumerator will send each reader with 
      BinlogSplitUpdateRequestEvent to update binlog. (see org.apache.flink.cdc.connectors.mysql.source.enumerator.MySqlSourceEnumerator#syncWithReaders).
      3. The Reader will suspend binlog reader then send BinlogSplitMetaRequestEvent to Enumerator.
      4. The Enumerator found that some tables are not sent, an error will occur

      private void sendBinlogMeta(int subTask, BinlogSplitMetaRequestEvent requestEvent) {
          // initialize once
          if (binlogSplitMeta == null) {
              final List<FinishedSnapshotSplitInfo> finishedSnapshotSplitInfos =
                      splitAssigner.getFinishedSplitInfos();
              if (finishedSnapshotSplitInfos.isEmpty()) {
                  LOG.error(
                          "The assigner offers empty finished split information, this should not happen");
                  throw new FlinkRuntimeException(
                          "The assigner offers empty finished split information, this should not happen");
              }
              binlogSplitMeta =
                      Lists.partition(
                              finishedSnapshotSplitInfos, sourceConfig.getSplitMetaGroupSize());
         } 
      }

       

      Attachments

        Activity

          People

            loserwang1024 Hongshun Wang
            loserwang1024 Hongshun Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: