Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a) Modifies database purge uve to include error/warning strings related to the last purge operation. b) Make sure all analytics start time are same when the system first gets started. Closes-Bug: 1451619 Change-Id: I68a78f6c8e120fafd771bfb84e89b06b49f3bbfd (cherry picked from commit 2015613) Fix database purge code in analytics-api This patch fixes the following issues in db_purge() method. 1) The key type for MESSAGE_TABLE_TIMESTAMP is different from the other message index tables. pycassaShell output: >>> MESSAGETABLETIMESTAMP.key_validation_class 'IntegerType' >>> MESSAGETABLESOURCE.key_validation_class 'CompositeType(IntegerType, UTF8Type)' >>> MESSAGETABLEMESSAGETYPE.key_validation_class 'CompositeType(IntegerType, UTF8Type)' The purge function always expects composite key and tries to extract the first element (timestamp) from the key. But for MESSAGE_TABLE_TIMESTAMP, the key is of type integer and hence it raises exception. Side-effect of this exception: data from the table MESSAGE_TABLE_TIMESTAMP not purged. 2) object identity check fails for table. => if (table is MESSAGE_TABLE_SOURCE): The above check always fails due to object id mismatch. Therefore, data is not purged from the MessageTable. Replaced object identity check with equality check. Change-Id: I51d619ac5275acf737094b7cdf36bb3d462fcf81 Closes-Bug: #1487966 (cherry picked from commit 95077da)
- Loading branch information
1 parent
105352b
commit 377827c
Showing
6 changed files
with
91 additions
and
41 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
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