code: public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes)
      {
          try (OpOrder.Group opGroup = writeOrder.start())
          {
              // write the mutation to the commitlog and memtables
              ReplayPosition replayPosition = null;
              if (writeCommitLog)
              {
                  Tracing.trace("Appending to commitlog");
                  replayPosition = CommitLog.instance.add(mutation);
              }
  
              DecoratedKey key = StorageService.getPartitioner().decorateKey(mutation.key());
              for (ColumnFamily cf : mutation.getColumnFamilies())
              {
                  ColumnFamilyStore cfs = columnFamilyStores.get(cf.id());
                  if (cfs == null)
                  {
                      logger.error("Attempting to mutate non-existant column family {}", cf.id());
                      continue;
                  }
  
                  Tracing.trace("Adding to {} memtable", cf.metadata().cfName);
                  SecondaryIndexManager.Updater updater = updateIndexes
                                                        ? cfs.indexManager.updaterFor(key, cf, opGroup)
                                                        : SecondaryIndexManager.nullUpdater;
                  cfs.apply(key, cf, updater, opGroup, replayPosition);
              }
          }
      }
docs: This method appends a row to the global CommitLog, then updates memtables and indexes.
  
  @param mutation       the row to write.  Must not be modified after calling apply, since commitlog append
  may happen concurrently, depending on the CL Executor type.
  @param writeCommitLog false to disable commitlog append entirely
  @param updateIndexes  false to disable index updates (used by CollationController "defragmenting")