Fix result count log for Get requests
Since the Cassandra interface returns a dictionary with all keys
present, the result count always matched the request.
@@ -921,12 +921,14 @@ class DatastoreDistributed():
raise zkte
results, row_keys = self.fetch_keys(keys)
- self.logger.debug('Returning {} results'.format(len(results)))
+ result_count = 0
for r in row_keys:
group = get_response.add_entity()
if r in results and APP_ENTITY_SCHEMA[0] in results[r]:
+ result_count += 1
group.mutable_entity().CopyFrom(
entity_pb.EntityProto(results[r][APP_ENTITY_SCHEMA[0]]))
+ self.logger.debug('Returning {} results'.format(result_count))
def dynamic_delete(self, app_id, delete_request):
""" Deletes a set of rows.
