0

我正在尝试使用该cassandra-stress工具在复制因子 = 3 的 6 节点集群上使用配置文件运行压力测试。

./cassandra-stress user profile=/path/to/cassandra_stress.yaml duration=2h ops\(insert=20,select=10\) **cl=local_quorum** no-warmup -node nodeaddress -transport truststore=/path/to/tls/truststore.jks truststore-password=***** -rate threads=5 -log level=verbose file=/path/to/log -graph file=graph_.html title='Graph' & 2>1

执行在某个时间点以 ReadTimeout 停止,日志显示以下内容:

com.datastax.driver.core.exceptions.WriteTimeoutException:在一致性LOCAL_QUORUM写入查询期间 Cassandra 超时(需要 2 个副本,但只有 1 个确认写入)

com.datastax.driver.core.exceptions.ReadTimeoutException:Cassandra在一致性读取查询期间超时ALL(需要 3 个副本,但只有 2 个确认读取)

我不确定为什么cl=local_quorum要写入而不是读取。任何见解都会有所帮助。

轮廓

# Keyspace Name keyspace: d3 keyspace_definition: |   CREATE KEYSPACE d3 WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3'} AND DURABLE_WRITES = true;


# Table name table: stress_offheap_long table_definition: |   CREATE TABLE d3.stress_offheap_long (
    dart_id timeuuid,
    dart_version_id timeuuid,
    account_id timeuuid,
    amount double,
    data text,
    state text, PRIMARY KEY (dart_id, dart_version_id)   ) WITH CLUSTERING ORDER BY (dart_version_id DESC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys':'ALL', 'rows_per_partition':'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

columnspec:
  - name: dart_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: art_version_id
    size: gaussian(36..64)

  - name: account_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: amount
    size: fixed(1)

  - name: data
    size: gaussian(5000..20000)

  - name: state
    size: gaussian(1..2)
    population: fixed(1)

### Batch Ratio Distribution Specifications ###

insert:
  partitions: fixed(1)

  select:    fixed(1)/1000

  batchtype: UNLOGGED             # Unlogged batches


#
# A list of queries you wish to run against the schema
#
queries:
   select:
      cql: select * from stress_offheap_long where dart_id = ? and dart_version_id=? LIMIT 1
      fields: samerow
4

0 回答 0