Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Sharded counter implementation not optimized for appengine pricing #3

@krullert

Description

@krullert

The appengine sharded counter documentation
describes the implementation example as seen in: Sharded Counters Java Implementation

Whereas the implementation uses an unindexed property for the count.
I believe this causes a read-operation for each count entity, whereas
if I would make it indexed, and use a project query as;

final Query query = new Query(getKind())
    .addProjection(new PropertyProjection(CounterShard.COUNT, Long.class));

It would (according to the current quota/pricing page create a projection query

Projection queries that do not use the distinct on clause.
This type of query is counted as a single entity read for the query itself.
The individual results are counted as small operations.

So that would be a single entity read for the entire query, instead of readops being equal to the number of shards?

Is this correct or am I missing something?

See also: Quotas, App Engine Issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions