[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cassandra-dev
Subject:    How indexes work?
From:       Alex Denisov <1101.debian () gmail ! com>
Date:       2017-09-16 7:23:41
Message-ID: B6220E98-8409-4FAF-AD28-95F297E3E470 () gmail ! com
[Download RAW message or body]

Hi folks,

I have few questions regarding indexes.
I skimmed through the source code, and I have a brief understanding of =
how indexes work in Cassandra.
However, some cases are not clear to me.

1. One creates an index on an existing table (timestamp T1). Eventually, =
Cassandra builds the full index for the table (timestamp T2).
If I understand correctly, then Cassandra cannot use the index between =
T1 and T2 because it does not cover the whole table.
What happens with the queries between T1 and T2?
How does Cassandra know where the index is full or not?
How is this decision affected by the distributed nature of the system?

2. An index exists on a table. One inserts a new value (V) into the =
table (T1), then the value gets into the index and being inserted into =
the index's storage (T2).
What happens if a query happens between T1 and T2? If Cassandra uses the =
index, then V is not returned to a user (even though it is technically =
in the database), right?
The same question applies to the other mutations (update/delete).


I believe there are many more edge cases I am not aware of, or I did not =
consider. Please, feel free to share them here if you know any other =
tricky places.

Thank you.
--
AlexDenisov
Software Engineer, https://lowlevelbits.org


["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJZvNF9AAoJEKnZX2FYSnX6goMIALeYQoPMP3asf0+w/YwSno+7
0D2hhCo9xnKxvovnYSBO014XeS/7EPvFckNXYZuLBj7VNw9xPqdJ1nj5ujV9vtHm
jHpmQvYzWkwCKVazJuOAr3FvzfgECqb3z7AmCswj/h2k/vdrc/NcEsyPRqcbb5g7
JBVv01nNcwQ8bUGC953P9Z51usx75LRHYLnd+8qzohkQskezWSNY5fT/LVZesYp/
rthPVnM5pnvLdu18ZzWdeHKaKZoqr24tQ/5F0CDiR40Bwq+2JtF5O+jupCc14M89
B78c9BDKZc3x6m7EkPLxsKDAhnXojjtPBV4/l4xzVUNxoyAc4toBUGBBKSPqdMg=
=pCsp
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic