Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Optimize compaction #364

Open
wants to merge 1 commit into
base: branch-3.11.0
Choose a base branch
from

Conversation

kamijin-fanta
Copy link

summary

  • Add use_ttl new option.
  • if use_ttl = false, disable unnecessary partition reading at compaction.
-- examle create table queries.
CREATE CUSTOM INDEX table_index ON ks1.table ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
    'refresh_seconds': '15',
    'use_ttl': false,
    'partitioner': '{type: "vnode", vnodes_per_partition: 8}',
    'schema': '{
      fields: {
          filed: {type: "string"}
      }
    }'
};

describe

I was investigating the compaction speed when enabling this plug-in.

When SSTable increased, the speed of compaction fell below 1%. I anticipate that read latency will be higher. Then I checked if it really needed partition reading at compaction time.

72c4875#diff-298e208e90f66d25100b3cd7dbf19d5bR71

This code was added for support TTL . If do not use TTL, this overhead is unnecessary ...? I put in debugging code in IndexWriterWide#commit(). What is SinglePartitionReadCommand reading when transactiontype == COMPACTION? As a result, did not read anything. So I added a flag to disable this.

(I do not fully understand the life cycle of Cassandra Indexer. Please point out if there is a mistake.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant