Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add row_id to cassandra for long polling (#25)
* add row_id to cassandra for long polling * change method signature * updated changelog and adding migration script * updated case * merge after func with get * Apply suggestions from code review Co-Authored-By: kristinaspring <kmspring57@gmail.com> Co-authored-by: kristinaspring <kmspring57@gmail.com>
- Loading branch information
1 parent
601199a
commit ad6e08e
Showing
9 changed files
with
237 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Cassandra DB driver | ||
This implementation is geared towards yugabyte. | ||
|
||
# Migration from v0.4.0 to v0.5.0 | ||
The addition of row_id as a TIMEUUID as a simplistic version of state hash. | ||
Since row_id can be null, gungnir will work with both database schemas. | ||
In order to do long polling, gungnir db driver will need to be updated. | ||
Svalinn is not backwards compatible as the insert statement has changed to include the | ||
TIMEUUID. | ||
|
||
The following is the migration script from v0.4.0 to v0.5.0 | ||
```cassandraql | ||
ALTER TABLE devices.events ADD row_id TIMEUUID; | ||
CREATE INDEX search_by_row_id ON devices.events | ||
(device_id, row_id) | ||
WITH CLUSTERING ORDER BY (row_id DESC) | ||
AND default_time_to_live = 2768400 | ||
AND transactions = {'enabled': 'false', 'consistency_level':'user_enforced'}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.