docs: private boolean applySnapshotToDB(EntryPosition position, boolean init) {
          // 获取一份快照
          Map<String, String> schemaDdls = null;
          lock.readLock().lock();
          try {
              if (!init && !hasNewDdl) {
                  // 如果是持续构建,则识别一下是否有DDL变更过,如果没有就忽略了
                  return false;
              }
              this.hasNewDdl = false;
              schemaDdls = memoryTableMeta.snapshot();
          } finally {
              lock.readLock().unlock();
          }
  
          MemoryTableMeta tmpMemoryTableMeta = new MemoryTableMeta();
          for (Map.Entry<String, String> entry : schemaDdls.entrySet()) {
              tmpMemoryTableMeta.apply(position, entry.getKey(), entry.getValue(), null);
          }
  
          // 基于临时内存对象进行对比
          boolean compareAll = true;
          for (Schema schema : tmpMemoryTableMeta.getRepository().getSchemas()) {
              for (String table : schema.showTables()) {
                  String fullName = schema + "." + table;
                  if (blackFilter == null || !blackFilter.filter(fullName)) {
                      if (filter == null || filter.filter(fullName)) {
                          // issue : https://github.com/alibaba/canal/issues/1168
                          // 在生成snapshot时重新过滤一遍
                          if (!compareTableMetaDbAndMemory(connection, tmpMemoryTableMeta, schema.getName(), table)) {
                              compareAll = false;
                          }
                      }
                  }
              }
          }
  
          if (compareAll) {
              Map<String, String> content = new HashMap<String, String>();
              content.put("destination", destination);
              content.put("binlogFile", position.getJournalName());
              content.put("binlogOffest", String.valueOf(position.getPosition()));
              content.put("binlogMasterId", String.valueOf(position.getServerId()));
              content.put("binlogTimestamp", String.valueOf(position.getTimestamp()));
              content.put("data", JSON.toJSONString(schemaDdls));
              if (content.isEmpty()) {
                  throw new RuntimeException("apply failed caused by content is empty in applySnapshotToDB");
              }
  
              MetaSnapshotDO snapshotDO = new MetaSnapshotDO();
              try {
                  BeanUtils.populate(snapshotDO, content);
                  metaSnapshotDAO.insert(snapshotDO);
              } catch (Throwable e) {
                  if (isUkDuplicateException(e)) {
                      // 忽略掉重复的位点
                      logger.info("dup apply snapshot use position : " + position + " , just ignore");
                  } else {
                      throw new CanalParseException("apply failed caused by : " + e.getMessage(), e);
                  }
              }
              return true;
          } else {
              logger.error("compare failed , check log");
          }
          return false;
      }