ZhiXingHeYiApple opened a new issue, #240:
URL: https://github.com/apache/pekko-persistence-cassandra/issues/240

   
   CassandraJournalStatements.scala
   ```scala
     def selectHighestSequenceNr =
       s"""
        SELECT sequence_nr FROM $tableName WHERE
          persistence_id = ? AND
          partition_nr = ?
          ORDER BY sequence_nr
          DESC LIMIT 1
      """
   ```
   
   journal messages table of cassandra below:
   ```sql
   CREATE TABLE IF NOT EXISTS pekko.messages (
     persistence_id text,
     partition_nr bigint,
     sequence_nr bigint,
     timestamp timeuuid,
     timebucket text,
     writer_uuid text,
     ser_id int,
     ser_manifest text,
     event_manifest text,
     event blob,
     meta_ser_id int,
     meta_ser_manifest text,
     meta blob,
     tags set<text>,
     PRIMARY KEY ((persistence_id, partition_nr), sequence_nr, timestamp))     
--- sequence_nr default is asc order
     WITH gc_grace_seconds =864000
     AND compaction = {
       'class' : 'SizeTieredCompactionStrategy',
       'enabled' : true,
       'tombstone_compaction_interval' : 86400,
       'tombstone_threshold' : 0.2,
       'unchecked_tombstone_compaction' : false,
       'bucket_high' : 1.5,
       'bucket_low' : 0.5,
       'max_threshold' : 32,
       'min_threshold' : 4,
       'min_sstable_size' : 50
       };
   
   ```
   
   When business application actors are restored from cassandra disks, there 
will be a large number of slow queries. Is there any way to eliminate this 
reverse order query? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to