You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "wei song (Jira)" <ji...@apache.org> on 2022/06/09 01:10:00 UTC

[jira] [Comment Edited] (CASSANDRA-17682) index read is from one node when authenticator is passwordAuthenticator

    [ https://issues.apache.org/jira/browse/CASSANDRA-17682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550760#comment-17550760 ] 

wei song  edited comment on CASSANDRA-17682 at 6/9/22 1:09 AM:
---------------------------------------------------------------

Here is a reproduction in the above cluster. The keyspace is created by:
{code:java}
CREATE KEYSPACE cloud_4test WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '3'}  AND durable_writes = true; 
CREATE TABLE cloud_4test.test (
    test_id text PRIMARY KEY,
    account_id bigint
);
CREATE INDEX test_account_id_idx ON cloud_4test.test (account_id);{code}
Cassandra-3.11.x cannot get index read count by tablestats like Cassandra2, so index reads is gotten from disk read IO:
{code:java}
                Table (index): test.test_account_id_idx
                SSTable count: 0
                Space used (live): 0
                Space used (total): 0
                Space used by snapshots (total): 0
                Off heap memory used (total): 0
                SSTable Compression Ratio: -1.0
                Number of partitions (estimate): 0
                Memtable cell count: 0
                Memtable data size: 0
                Memtable off heap memory used: 0
                Memtable switch count: 0
                Local read count: 0                    //this value of Table (index) is always 0 in cassandra3.11.x
                Local read latency: NaN ms
                Local write count: 0
                Local write latency: NaN ms
                Pending flushes: 0
                Percent repaired: 100.0
                Bloom filter false positives: 0
                Bloom filter false ratio: 0.00000
                Bloom filter space used: 0
                Bloom filter off heap memory used: 0
                Index summary off heap memory used: 0
                Compression metadata off heap memory used: 0
                Compacted partition minimum bytes: 0
                Compacted partition maximum bytes: 0
                Compacted partition mean bytes: 0
                Average live cells per slice (last five minutes): NaN
                Maximum live cells per slice (last five minutes): 0
                Average tombstones per slice (last five minutes): NaN
                Maximum tombstones per slice (last five minutes): 0
                Dropped Mutations: 0
 {code}
while client keeps reading by account_id,the disk IO monitoring of three nodes obtained by dstat is as follows:
{code:java}
//the disk IO monitoring of node 192.168.242.129 obtained by dstat 
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr  sys  idl  wai  hiq siq| read  writ  | used  buff cach  free|     time    |util:util |   read  writ | recv  send
 35  19  45   0   0   1|   0     0 | 765M 5772k  140M 65.6M|07-06 09:39:56|   0:   0|   0     0 | 309k  674k
 34  13  53   0   0   0|   0  6.00 | 765M 5772k  140M 65.4M|07-06 09:39:57|   0:   0|   0    24k| 270k  588k
 42  13  45   0   0   0|   0     0 | 765M 5772k  140M 65.3M|07-06 09:39:58|   0:   0|   0     0 | 314k  689k
 43  20  37   0   0   0|   0     0 | 765M 5772k  140M 65.4M|07-06 09:39:59|   0:   0|   0     0 | 343k  752k
 53  14  34   0   0   0|2.00  2.00 | 765M 5780k  140M 65.4M|07-06 09:40:00|2.00:   0|  52k   16k| 357k  801k
 41  19  40   0   0   0|   0     0 | 765M 5780k  140M 65.4M|07-06 09:40:01|   0:   0|   0     0 | 331k  711k
 44  18  37   0   0   0|   0     0 | 765M 5780k  132M 72.9M|07-06 09:40:02|   0:   0|   0     0 | 331k  768k
 46  15  39   0   0   0|   0     0 | 765M 5780k  132M 73.0M|07-06 09:40:03|   0:   0|   0     0 | 345k  795k
 42  14  43   0   0   1|   0     0 | 765M 5780k  132M 73.0M|07-06 09:40:04|   0:   0|   0     0 | 317k  721k
 45  17  36   1   0   0|   0  2.00 | 765M 5788k  132M 73.0M|07-06 09:40:05|0.80:   0|   0    16k| 327k  698k
 44  18  38   0   0   0|   0     0 | 764M 5788k  132M 73.1M|07-06 09:40:06|   0:   0|   0     0 | 349k  806k
 42  17  41   0   0   1|   0     0 | 765M 5788k  132M 72.9M|07-06 09:40:07|   0:   0|   0     0 | 325k  702k
 48  15  36   0   0   0|   0     0 | 765M 5788k  132M 73.0M|07-06 09:40:08|   0:   0|   0     0 | 348k  782k
 44  13  42   0   0   0|   0     0 | 765M 5788k  132M 73.0M|07-06 09:40:09|   0:   0|   0     0 | 312k  668k

//the disk IO monitoring of node 192.168.242.135 obtained by dstat
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr sys  idl   wai  hiq siq| read   writ | used  buff  cach free|     time   |util:  util| read    writ| recv  send
 35  17  47   0   0   1|   0     0 | 761M 4764k  138M 72.0M|07-06 09:39:57|   0:   0|   0     0 | 311k  598k
 46  14  41   0   0   0|   0     0 | 761M 4764k  138M 72.0M|07-06 09:39:58|   0:   0|   0     0 | 343k  690k
 46  12  40   1   0   0|   0  2.00 | 761M 4772k  138M 71.9M|07-06 09:39:59|1.60:   0|   0    36k| 341k  653k
 45  16  38   1   0   0|43.0     0 | 761M 4900k  138M 71.5M|07-06 09:40:00|7.60:   0| 300k    0 | 351k  670k
 42  14  44   0   0   1|   0     0 | 761M 4900k  138M 71.5M|07-06 09:40:01|   0:   0|   0     0 | 318k  624k
 45  14  41   0   0   0|   0     0 | 761M 4900k  138M 71.6M|07-06 09:40:02|   0:   0|   0     0 | 354k  671k
 44  16  39   0   0   0|   0     0 | 761M 4900k  138M 71.5M|07-06 09:40:03|   0:   0|   0     0 | 343k  652k
 44  12  44   1   0   0|2.00  2.00 | 761M 4908k  138M 71.5M|07-06 09:40:04|2.00:   0|  64k   44k| 317k  613k
 41  15  43   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:05|   0:   0|   0     0 | 326k  701k
 47  12  41   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:06|   0:   0|   0     0 | 345k  675k
 44  14  41   0   0   1|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:07|   0:   0|   0     0 | 343k  679k
 42  10  48   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:08|   0:   0|   0     0 | 309k  613k

//the disk IO monitoring of node 192.168.242.134 obtained by dstat
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr sys   idl wai   hiq siq|read   writ | used buff  cach  free|     time  |util: util| read    writ| recv  send
 44  16   0  38   0   1|83.0     0 | 650M 5012k  252M 68.3M|07-06 09:39:56|49.6:   0| 816k    0 | 274k  941k
 68  21   0  10   0   1|57.0  10.0 | 651M 5012k  252M 67.5M|07-06 09:39:57|26.8:   0| 716k   44k| 419k 1393k
 63  26   0  10   0   1|76.0     0 | 652M 5012k  252M 66.8M|07-06 09:39:58|12.8:   0| 820k    0 | 406k 1361k
 63  26   3   8   0   0|82.0  2.00 | 652M 5020k  252M 66.0M|07-06 09:39:59|14.8:   0| 892k   24k| 421k 1414k
 64  26   0   9   0   1|86.0     0 | 653M 5020k  252M 65.1M|07-06 09:40:00|16.8:   0| 900k    0 | 399k 1341k
 59  29   0  10   0   2|85.0     0 | 654M 5024k  252M 64.3M|07-06 09:40:01|13.6:   0| 800k    0 | 422k 1442k
 66  20   0  11   0   2|70.0     0 | 655M 5024k  252M 63.5M|07-06 09:40:02|12.8:   0| 788k    0 | 410k 1430k
 66  22   0  11   0   1|75.0  2.00 | 656M 5032k  252M 62.6M|07-06 09:40:03|17.6:   0| 856k   16k| 399k 1372k
 63  26   0   8   0   3|85.0     0 | 656M 5032k  253M 61.8M|07-06 09:40:04|20.4:   0| 884k    0 | 405k 1391k
 76  17   0   7   0   0|59.0     0 | 657M 5032k  253M 61.2M|07-06 09:40:05|10.0:   0| 592k    0 | 419k 1448k
 60  29   0  10   0   1|70.0     0 | 658M 5032k  253M 60.3M|07-06 09:40:06|12.4:   0| 836k    0 | 419k 1449k
 61  27   0  11   0   1|82.0  5.00 | 658M 5032k  253M 59.6M|07-06 09:40:07|17.6:   0| 820k  176k| 382k 1237k

{code}
As shown above, only 192.168.242.134 node has non-zero disk read IO and other two nodes have zero disk read IO

And when my config of authorizer in cassandra.yaml is :
{code:java}
authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer {code}
the disk read IO monitoring of three nodes obtained by dstat is non-zero while only reading by account_id.

 


was (Author: JIRAUSER290525):
Here is a reproduction in the above cluster. The keyspace is created by:

 
{code:java}
CREATE KEYSPACE cloud_4test WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '3'}  AND durable_writes = true; 
CREATE TABLE cloud_4test.test (
    test_id text PRIMARY KEY,
    account_id bigint
);
CREATE INDEX test_account_id_idx ON cloud_4test.test (account_id);{code}
Cassandra-3.11.x cannot get index read count by tablestats like Cassandra2, so index reads is gotten from disk read IO:
{code:java}
                Table (index): test.test_account_id_idx
                SSTable count: 0
                Space used (live): 0
                Space used (total): 0
                Space used by snapshots (total): 0
                Off heap memory used (total): 0
                SSTable Compression Ratio: -1.0
                Number of partitions (estimate): 0
                Memtable cell count: 0
                Memtable data size: 0
                Memtable off heap memory used: 0
                Memtable switch count: 0
                Local read count: 0                    //this value of Table (index) is always 0 in cassandra3.11.x
                Local read latency: NaN ms
                Local write count: 0
                Local write latency: NaN ms
                Pending flushes: 0
                Percent repaired: 100.0
                Bloom filter false positives: 0
                Bloom filter false ratio: 0.00000
                Bloom filter space used: 0
                Bloom filter off heap memory used: 0
                Index summary off heap memory used: 0
                Compression metadata off heap memory used: 0
                Compacted partition minimum bytes: 0
                Compacted partition maximum bytes: 0
                Compacted partition mean bytes: 0
                Average live cells per slice (last five minutes): NaN
                Maximum live cells per slice (last five minutes): 0
                Average tombstones per slice (last five minutes): NaN
                Maximum tombstones per slice (last five minutes): 0
                Dropped Mutations: 0
 {code}
while client keeps reading by account_id,the disk IO monitoring of three nodes obtained by dstat is as follows:

 

 
{code:java}
//the disk IO monitoring of node 192.168.242.129 obtained by dstat 
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr  sys  idl  wai  hiq siq| read  writ  | used  buff cach  free|     time    |util:util |   read  writ | recv  send
 35  19  45   0   0   1|   0     0 | 765M 5772k  140M 65.6M|07-06 09:39:56|   0:   0|   0     0 | 309k  674k
 34  13  53   0   0   0|   0  6.00 | 765M 5772k  140M 65.4M|07-06 09:39:57|   0:   0|   0    24k| 270k  588k
 42  13  45   0   0   0|   0     0 | 765M 5772k  140M 65.3M|07-06 09:39:58|   0:   0|   0     0 | 314k  689k
 43  20  37   0   0   0|   0     0 | 765M 5772k  140M 65.4M|07-06 09:39:59|   0:   0|   0     0 | 343k  752k
 53  14  34   0   0   0|2.00  2.00 | 765M 5780k  140M 65.4M|07-06 09:40:00|2.00:   0|  52k   16k| 357k  801k
 41  19  40   0   0   0|   0     0 | 765M 5780k  140M 65.4M|07-06 09:40:01|   0:   0|   0     0 | 331k  711k
 44  18  37   0   0   0|   0     0 | 765M 5780k  132M 72.9M|07-06 09:40:02|   0:   0|   0     0 | 331k  768k
 46  15  39   0   0   0|   0     0 | 765M 5780k  132M 73.0M|07-06 09:40:03|   0:   0|   0     0 | 345k  795k
 42  14  43   0   0   1|   0     0 | 765M 5780k  132M 73.0M|07-06 09:40:04|   0:   0|   0     0 | 317k  721k
 45  17  36   1   0   0|   0  2.00 | 765M 5788k  132M 73.0M|07-06 09:40:05|0.80:   0|   0    16k| 327k  698k
 44  18  38   0   0   0|   0     0 | 764M 5788k  132M 73.1M|07-06 09:40:06|   0:   0|   0     0 | 349k  806k
 42  17  41   0   0   1|   0     0 | 765M 5788k  132M 72.9M|07-06 09:40:07|   0:   0|   0     0 | 325k  702k
 48  15  36   0   0   0|   0     0 | 765M 5788k  132M 73.0M|07-06 09:40:08|   0:   0|   0     0 | 348k  782k
 44  13  42   0   0   0|   0     0 | 765M 5788k  132M 73.0M|07-06 09:40:09|   0:   0|   0     0 | 312k  668k

//the disk IO monitoring of node 192.168.242.135 obtained by dstat
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr sys  idl   wai  hiq siq| read   writ | used  buff  cach free|     time   |util:  util| read    writ| recv  send
 35  17  47   0   0   1|   0     0 | 761M 4764k  138M 72.0M|07-06 09:39:57|   0:   0|   0     0 | 311k  598k
 46  14  41   0   0   0|   0     0 | 761M 4764k  138M 72.0M|07-06 09:39:58|   0:   0|   0     0 | 343k  690k
 46  12  40   1   0   0|   0  2.00 | 761M 4772k  138M 71.9M|07-06 09:39:59|1.60:   0|   0    36k| 341k  653k
 45  16  38   1   0   0|43.0     0 | 761M 4900k  138M 71.5M|07-06 09:40:00|7.60:   0| 300k    0 | 351k  670k
 42  14  44   0   0   1|   0     0 | 761M 4900k  138M 71.5M|07-06 09:40:01|   0:   0|   0     0 | 318k  624k
 45  14  41   0   0   0|   0     0 | 761M 4900k  138M 71.6M|07-06 09:40:02|   0:   0|   0     0 | 354k  671k
 44  16  39   0   0   0|   0     0 | 761M 4900k  138M 71.5M|07-06 09:40:03|   0:   0|   0     0 | 343k  652k
 44  12  44   1   0   0|2.00  2.00 | 761M 4908k  138M 71.5M|07-06 09:40:04|2.00:   0|  64k   44k| 317k  613k
 41  15  43   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:05|   0:   0|   0     0 | 326k  701k
 47  12  41   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:06|   0:   0|   0     0 | 345k  675k
 44  14  41   0   0   1|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:07|   0:   0|   0     0 | 343k  679k
 42  10  48   0   0   0|   0     0 | 761M 4908k  138M 71.5M|07-06 09:40:08|   0:   0|   0     0 | 309k  613k

//the disk IO monitoring of node 192.168.242.134 obtained by dstat
----total-cpu-usage---- --io/total- ------memory-usage----- ----system---- sda- sr0- -dsk/total- -net/total-
  usr sys   idl wai   hiq siq|read   writ | used buff  cach  free|     time  |util: util| read    writ| recv  send
 44  16   0  38   0   1|83.0     0 | 650M 5012k  252M 68.3M|07-06 09:39:56|49.6:   0| 816k    0 | 274k  941k
 68  21   0  10   0   1|57.0  10.0 | 651M 5012k  252M 67.5M|07-06 09:39:57|26.8:   0| 716k   44k| 419k 1393k
 63  26   0  10   0   1|76.0     0 | 652M 5012k  252M 66.8M|07-06 09:39:58|12.8:   0| 820k    0 | 406k 1361k
 63  26   3   8   0   0|82.0  2.00 | 652M 5020k  252M 66.0M|07-06 09:39:59|14.8:   0| 892k   24k| 421k 1414k
 64  26   0   9   0   1|86.0     0 | 653M 5020k  252M 65.1M|07-06 09:40:00|16.8:   0| 900k    0 | 399k 1341k
 59  29   0  10   0   2|85.0     0 | 654M 5024k  252M 64.3M|07-06 09:40:01|13.6:   0| 800k    0 | 422k 1442k
 66  20   0  11   0   2|70.0     0 | 655M 5024k  252M 63.5M|07-06 09:40:02|12.8:   0| 788k    0 | 410k 1430k
 66  22   0  11   0   1|75.0  2.00 | 656M 5032k  252M 62.6M|07-06 09:40:03|17.6:   0| 856k   16k| 399k 1372k
 63  26   0   8   0   3|85.0     0 | 656M 5032k  253M 61.8M|07-06 09:40:04|20.4:   0| 884k    0 | 405k 1391k
 76  17   0   7   0   0|59.0     0 | 657M 5032k  253M 61.2M|07-06 09:40:05|10.0:   0| 592k    0 | 419k 1448k
 60  29   0  10   0   1|70.0     0 | 658M 5032k  253M 60.3M|07-06 09:40:06|12.4:   0| 836k    0 | 419k 1449k
 61  27   0  11   0   1|82.0  5.00 | 658M 5032k  253M 59.6M|07-06 09:40:07|17.6:   0| 820k  176k| 382k 1237k

{code}
As shown above, only 192.168.242.134 node has non-zero disk read IO and other two nodes have zero disk read IO

And when my config of authorizer in cassandra.yaml is :

 
{code:java}
authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer {code}
 

 

the disk read IO monitoring of three nodes obtained by dstat is non-zero while only reading by account_id.

 

> index read is from one node when authenticator is passwordAuthenticator
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-17682
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17682
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: wei song 
>            Priority: Normal
>
> I have a cluster which replication_factor is 3 like:
> {code:java}
> Datacenter: DC1
> ================
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address          Load       Tokens       Owns    Host ID                               Rack
> UN  192.168.242.129  271.1 MiB  256          ?       bda86425-b6cd-479d-a410-c9bd8826d505  rack1
> UN  192.168.242.134  256.13 MiB  256          ?       a1935992-3443-4f02-9496-23def15d950d  rack1
> UN  192.168.242.135  270.81 MiB  256          ?       8031e6fd-6d60-4fb2-8323-14f93f4c1468  rack1
>  {code}
> While authenticator is passwordAuthenticator,all read disk IO for index reads comes from a node。Read disk IO of other node is 0. it is just like that all index read is from one node. 
> By the way, index read connot get from nodetool tablestats of cassandra3.11.x
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org