public static IMemTable create(DataInputStream stream) throws IOException {
      byte marker = ReadWriteIOUtils.readByte(stream);
      boolean isSignal = marker == 1;
      IMemTable memTable;
      if (isSignal) {
        memTable = new NotifyFlushMemTable();
      } else {
        // database will be updated when deserialize
        PrimitiveMemTable primitiveMemTable = new PrimitiveMemTable();
        primitiveMemTable.deserialize(stream, marker == -1);
        memTable = primitiveMemTable;
      }
      return memTable;
    }
Notice: this method is concurrent unsafe.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractMemTable.java