(database, model)
Get counts of any `model` data residing on shards that aren't expected to live in `database`.

    Returns a list of tuples of the format:
    [
      (shard_id, count_of_unexpected_models),
    ]

    The list will be empty if no invalid data is found.
Get counts of any `model` data residing on shards that aren't expected to live in `database`.
Get counts of any model data residing on shards that aren t expected to live in database .
def get_count_of_unmatched_models_by_shard(database, model):
    """
    Get counts of any `model` data residing on shards that aren't expected to live in `database`.

    Returns a list of tuples of the format:
    [
      (shard_id, count_of_unexpected_models),
    ]

    The list will be empty if no invalid data is found.
    """
    with model.get_cursor_for_partition_db(database) as cursor:
        query = _get_unmatched_shard_count_query_for_testing(model)
        valid_shards = plproxy_config.get_shards_on_db(database)
        cursor.execute(query, [valid_shards])
        results = cursor.fetchall()
        return results
def get_count_of_unmatched_models_by_shard ( database , model ) : with model . get_cursor_for_partition_db ( database ) as cursor : query = _get_unmatched_shard_count_query_for_testing ( model ) valid_shards = plproxy_config . get_shards_on_db ( database ) cursor . execute ( query , [ valid_shards ] ) results = cursor . fetchall ( ) return results