Skip to content

Lease by Physical Partition Key Range #148

@hallipr

Description

@hallipr

None of the documentation for change feeds mention physical partitions, but those are the leased units. I don't believe any of my collections have more that 1 physical partition, so none of our feeds are load balanced because one host gets the only available lease.

DocDBTrace Information: 0 : Source collection: 'dbs/ReleaseService/colls/Logs', 1 partition(s)
DocDBTrace Information: 0 : Host '1787-4' 1 partitions, 1 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 1, will try to take 0 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-7' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-2' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-9' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-6' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-3' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-1' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-0' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-5' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.
DocDBTrace Information: 0 : Host '1787-8' 1 partitions, 2 hosts, 0 available leases, target = 1, min = 0, max = 0, mine = 0, will try to take 1 lease(s) for myself'.

With 2M documents in a collection and throughput at about 150 documents / second, it would take 4 hours for the single active host to process the backlog, and that's with a no-op onChangesDelegate.

Are my collections odd in that they have only one physical?

It would seem like a lot of people assume that change feeds will load balance their partitions given that none of the documentation on change feeds indicates otherwise, but in practice, only one instance processes the entire collection.

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