private void flushDirtyPagesWithLogging(List<ISchemaPage> dirtyPages) throws IOException {
    if (dirtyPages.size() == 0) {
      return;
    }

    if (logCounter.get() > SchemaFileConfig.SCHEMA_FILE_LOG_SIZE) {
      logWriter = logWriter.renew();
      logCounter.set(0);
    }

    logCounter.addAndGet(dirtyPages.size());
    for (ISchemaPage page : dirtyPages) {
      page.syncPageBuffer();
      logWriter.write(page);
    }
    logWriter.prepare();

    for (ISchemaPage page : dirtyPages) {
      page.flushPageToChannel(channel);
    }
    logWriter.commit();
  }
Load bytes from log, deserialize and flush directly into channel, return current length
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/PageIOChannel.java