:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(personhog): add keyset pagination for GetDistinctIdsForPerson RPC (#101309)
Nick Best0260e379b4d2
diff --git a/nodejs/src/common/generated/personhog/personhog/types/v1/person_pb.ts b/nodejs/src/common/generated/personhog/personhog/types/v1/person_pb.tsindex 7e87f118f15f..746a11dc94d2 100644--- a/nodejs/src/common/generated/personhog/personhog/types/v1/person_pb.ts+++ b/nodejs/src/common/generated/personhog/personhog/types/v1/person_pb.ts@@ -13,7 +13,7 @@ import { file_personhog_types_v1_common } from './common_pb'export const file_personhog_types_v1_person: GenFile =/*@__PURE__*/fileDesc(- 'Ch9wZXJzb25ob2cvdHlwZXMvdjEvcGVyc29uLnByb3RvEhJwZXJzb25ob2cudHlwZXMudjEisgIKBlBlcnNvbhIKCgJpZBgBIAEoAxIMCgR1dWlkGAIgASgJEg8KB3RlYW1faWQYAyABKAMSEgoKcHJvcGVydGllcxgEIAEoDBIiChpwcm9wZXJ0aWVzX2xhc3RfdXBkYXRlZF9hdBgFIAEoDBIhChlwcm9wZXJ0aWVzX2xhc3Rfb3BlcmF0aW9uGAYgASgMEhIKCmNyZWF0ZWRfYXQYByABKAMSDwoHdmVyc2lvbhgIIAEoAxIVCg1pc19pZGVudGlmaWVkGAkgASgIEhcKCmlzX3VzZXJfaWQYCiABKAhIAIgBARIZCgxsYXN0X3NlZW5fYXQYCyABKANIAYgBARISCgppc19kZWxldGVkGAwgASgIQg0KC19pc191c2VyX2lkQg8KDV9sYXN0X3NlZW5fYXQiTgoVRGlzdGluY3RJZFdpdGhWZXJzaW9uEhMKC2Rpc3RpbmN0X2lkGAEgASgJEhQKB3ZlcnNpb24YAiABK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AQESEgoKY3JlYXRlZF9hdBgEIAEoA0IRCg9fc2VhbGVkX3ZlcnNpb24iFwoVUmVsZWFzZUZlbmNlc1Jlc3BvbnNlIlMKFFNlYWxlZFNvdXJjZVNuYXBzaG90EioKBnBlcnNvbhgBIAEoCzIaLnBlcnNvbmhvZy50eXBlcy52MS5QZXJzb24SDwoHb3JkaW5hbBgCIAEoBSK9AQoZRm9sZFBlcnNvbkRvY3VtZW50UmVxdWVzdBIPCgd0ZWFtX2lkGAEgASgDEhEKCXBlcnNvbl9pZBgCIAEoAxJCChBzZWFsZWRfc25hcHNob3RzGAMgAygLMigucGVyc29uaG9nLnR5cGVzLnYxLlNlYWxlZFNvdXJjZVNuYXBzaG90EhEKCWV2ZW50X3NldBgEIAEoDBIWCg5ldmVudF9zZXRfb25jZRgFIAEoDBINCgVvcF9pZBgGIAEoCSJIChpGb2xkUGVyc29uRG9jdW1lbnRSZXNwb25zZRIqCgZwZXJzb24YASABKAsyGi5wZXJzb25ob2cudHlwZXMudjEuUGVyc29uKm8KD0xpZmVjeWNsZU9wVHlwZRIhCh1MSUZFQ1lDTEVfT1BfVFlQRV9VTlNQRUNJRklFRBAAEhwKGExJRkVDWUNMRV9PUF9UWVBFX0RFTEVURRABEhsKF0xJRkVDWUNMRV9PUF9UWVBFX01FUkdFEAIqbQoOUmVsZWFzZU91dGNvbWUSHwobUkVMRUFTRV9PVVRDT01FX1VOU1BFQ0lGSUVEEAASHQoZUkVMRUFTRV9PVVRDT01FX0NPTU1JVFRFRBABEhsKF1JFTEVBU0VfT1VUQ09NRV9BQk9SVEVEEAJiBnByb3RvMw',[file_personhog_types_v1_common])@@ -114,6 +114,13 @@ export type DistinctIdWithVersion = Message<'personhog.types.v1.DistinctIdWithVe* @generated from field: optional int64 version = 2;*/version?: bigint++ /**+ * Row ID, usable as a pagination cursor.+ *+ * @generated from field: optional int64 id = 3;+ */+ id?: bigint}/**@@ -501,6 +508,13 @@ export type GetDistinctIdsForPersonRequest = Message<'personhog.types.v1.GetDist* @generated from field: optional int64 limit = 4;*/limit?: bigint++ /**+ * Keyset cursor: return rows with id > cursor_id.+ *+ * @generated from field: optional int64 cursor_id = 5;+ */+ cursorId?: bigint}/**@@ -519,6 +533,13 @@ export type GetDistinctIdsForPersonResponse = Message<'personhog.types.v1.GetDis* @generated from field: repeated personhog.types.v1.DistinctIdWithVersion distinct_ids = 1;*/distinctIds: DistinctIdWithVersion[]++ /**+ * Absent when no more pages.+ *+ * @generated from field: optional int64 next_cursor_id = 2;+ */+ nextCursorId?: bigint}/**diff --git a/posthog/models/person/util.py b/posthog/models/person/util.pyindex 17fa67726215..e28f136700b4 100644--- a/posthog/models/person/util.py+++ b/posthog/models/person/util.py@@ -187,6 +187,35 @@ def _batched_get_distinct_ids_for_persons(return distinct_ids_by_person+def _paginated_get_distinct_ids_for_person(+ team_id: int,+ person_id: int,+ page_size: int = 5000,+) -> list[DistinctIdForPerson]:+ """Fetch all distinct IDs for a single person using keyset pagination."""+ client = _get_client()+ all_dids: list[DistinctIdForPerson] = []+ cursor_id: int = 0++ while True:+ request = GetDistinctIdsForPersonRequest(+ team_id=team_id,+ person_id=person_id,+ limit=page_size,+ cursor_id=cursor_id,+ )++ resp = client.get_distinct_ids_for_person(request)+ for d in resp.distinct_ids:+ all_dids.append(DistinctIdForPerson(id=d.distinct_id, version=int(d.version or 0)))++ if not resp.HasField("next_cursor_id"):+ break+ cursor_id = resp.next_cursor_id++ return all_dids++if TEST:def bulk_create_persons(persons_list: list[dict]):diff --git a/posthog/personhog_client/fake_client.py b/posthog/personhog_client/fake_client.pyindex 93bede16c5db..e1c68a6787d5 100644--- a/posthog/personhog_client/fake_client.py+++ b/posthog/personhog_client/fake_client.py@@ -94,6 +94,9 @@ class FakePersonHogClient:# synthetic ids for persons created by split_personself._next_split_person_id = 1_000_000_000+ # monotonic counter for distinct ID row IDs+ self._next_distinct_id_row_id = 1+# ── Builder methods ──────────────────────────────────────────────def add_person(@@ -265,11 +268,32 @@ class FakePersonHogClient:self, request: person_pb2.GetDistinctIdsForPersonRequest) -> person_pb2.GetDistinctIdsForPersonResponse:self.calls.append(_Call("get_distinct_ids_for_person", request))- dids = self._distinct_ids.get((request.team_id, request.person_id), [])+ dids = list(self._distinct_ids.get((request.team_id, request.person_id), []))limit = request.limit if request.HasField("limit") and request.limit > 0 else None- if limit is not None:+ has_cursor = request.HasField("cursor_id")+ cursor_id = request.cursor_id if has_cursor else None++ for d in dids:+ if not d.HasField("id"):+ d.id = self._next_distinct_id_row_id+ self._next_distinct_id_row_id += 1++ if has_cursor:+ dids = [d for d in dids if d.id > (cursor_id or 0)]+ dids.sort(key=lambda d: d.id)+ if limit is not None:+ dids = dids[:limit]+ elif limit is not None:dids = _order_identified_first(dids)[:limit]- return person_pb2.GetDistinctIdsForPersonResponse(distinct_ids=dids)++ next_cursor_id = None+ if limit is not None and len(dids) >= limit:+ next_cursor_id = dids[-1].id++ return person_pb2.GetDistinctIdsForPersonResponse(+ distinct_ids=dids,+ next_cursor_id=next_cursor_id,+ )def get_distinct_ids_for_persons(self, request: person_pb2.GetDistinctIdsForPersonsRequestdiff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py b/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyindex 9ad1908636a8..3a8ccbcb1c92 100644--- a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py+++ b/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py@@ -15,110 +15,110 @@ _sym_db = _symbol_database.Default()from ....personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(- b'\n\x1fpersonhog/types/v1/person.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xb2\x02\n\x06Person\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0f\n\x07team_id\x18\x03 \x01(\x03\x12\x12\n\nproperties\x18\x04 \x01(\x0c\x12"\n\x1aproperties_last_updated_at\x18\x05 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x06 \x01(\x0c\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x12\x0f\n\x07version\x18\x08 \x01(\x03\x12\x15\n\ris_identified\x18\t \x01(\x08\x12\x17\n\nis_user_id\x18\n \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x0b \x01(\x03H\x01\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08B\r\n\x0b_is_user_idB\x0f\n\r_last_seen_at"N\n\x15DistinctIdWithVersion\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x14\n\x07version\x18\x02 \x01(\x03H\x00\x88\x01\x01B\n\n\x08_version"h\n\x15PersonWithDistinctIds\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"g\n\x11PersonDistinctIds\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12?\n\x0cdistinct_ids\x18\x02 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion"\x87\x01\n\x18PersonWithTeamDistinctId\x12/\n\x03key\x18\x01 \x01(\x0b2".personhog.types.v1.TeamDistinctId\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"m\n\x10GetPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"O\n\x11GetPersonResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"o\n\x11GetPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"S\n\x0fPersonsResponse\x12+\n\x07persons\x18\x01 \x03(\x0b2\x1a.personhog.types.v1.Person\x12\x13\n\x0bmissing_ids\x18\x02 \x03(\x03"n\n\x16GetPersonByUuidRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"q\n\x18GetPersonsByUuidsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05uuids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"{\n\x1cGetPersonByDistinctIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"\x84\x01\n$GetPersonsByDistinctIdsInTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdistinct_ids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"`\n"PersonsByDistinctIdsInTeamResponse\x12:\n\x07results\x18\x01 \x03(\x0b2).personhog.types.v1.PersonWithDistinctIds"\x96\x01\n\x1eGetPersonsByDistinctIdsRequest\x12=\n\x11team_distinct_ids\x18\x01 \x03(\x0b2".personhog.types.v1.TeamDistinctId\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"]\n\x1cPersonsByDistinctIdsResponse\x12=\n\x07results\x18\x01 \x03(\x0b2,.personhog.types.v1.PersonWithTeamDistinctId"\x99\x01\n\x1eGetDistinctIdsForPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x12\n\x05limit\x18\x04 \x01(\x03H\x00\x88\x01\x01B\x08\n\x06_limit"b\n\x1fGetDistinctIdsForPersonResponse\x12?\n\x0cdistinct_ids\x18\x01 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion"\xb1\x01\n\x1fGetDistinctIdsForPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x1d\n\x10limit_per_person\x18\x04 \x01(\x03H\x00\x88\x01\x01B\x13\n\x11_limit_per_person"f\n GetDistinctIdsForPersonsResponse\x12B\n\x13person_distinct_ids\x18\x01 \x03(\x0b2%.personhog.types.v1.PersonDistinctIds"\x96\x02\n\x1dUpdatePersonPropertiesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x12\n\nevent_name\x18\x03 \x01(\t\x12\x16\n\x0eset_properties\x18\x04 \x01(\x0c\x12\x1b\n\x13set_once_properties\x18\x05 \x01(\x0c\x12\x18\n\x10unset_properties\x18\x06 \x03(\t\x12\x1a\n\ris_identified\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x0cforce_update\x18\t \x01(\x08B\x10\n\x0e_is_identifiedB\x0f\n\r_last_seen_at"m\n\x1eUpdatePersonPropertiesResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x12\x0f\n\x07updated\x18\x02 \x01(\x08B\t\n\x07_person"=\n\x14DeletePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t".\n\x15DeletePersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"G\n DeletePersonsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03":\n!DeletePersonsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"Y\n\x1eDeleteTombstonedPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t\x12\x10\n\x08max_rows\x18\x03 \x01(\x03"\xa6\x01\n\x1fDeleteTombstonedPersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x12\x1a\n\x12skipped_live_count\x18\x02 \x01(\x03\x12\x1c\n\x14blocked_person_uuids\x18\x03 \x03(\t\x12\x1c\n\x14pending_person_uuids\x18\x04 \x03(\t\x12\x14\n\x0crows_deleted\x18\x05 \x01(\x03"W\n\x12SplitPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x1d\n\x15distinct_ids_to_split\x18\x03 \x03(\t"\x8e\x01\n\x0bSplitResult\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x17\n\x0fnew_person_uuid\x18\x02 \x01(\t\x12\x1a\n\x12new_person_version\x18\x03 \x01(\x03\x12\x13\n\x0bpdi_version\x18\x04 \x01(\x03\x12 \n\x18new_person_created_at_ms\x18\x05 \x01(\x03"F\n\x13SplitPersonResponse\x12/\n\x06splits\x18\x01 \x03(\x0b2\x1f.personhog.types.v1.SplitResult"c\n&SetPersonDistinctIdVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"e\n\'SetPersonDistinctIdVersionFloorResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"W\n\x1cSetPersonVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"0\n\x1dSetPersonVersionFloorResponse\x12\x0f\n\x07updated\x18\x01 \x01(\x08"}\n\x12FencePersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\r\n\x05op_id\x18\x03 \x01(\t\x124\n\x07op_type\x18\x04 \x01(\x0e2#.personhog.types.v1.LifecycleOpType"A\n\x13FencePersonResponse\x12*\n\x06sealed\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person"\x7f\n\x13FencePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x124\n\x07op_type\x18\x03 \x01(\x0e2#.personhog.types.v1.LifecycleOpType\x12\x12\n\nperson_ids\x18\x04 \x03(\x03"_\n\x14FencePersonsResponse\x124\n\x06sealed\x18\x01 \x03(\x0b2$.personhog.types.v1.FencedPersonSeal\x12\x11\n\tnot_found\x18\x02 \x03(\x03"J\n\x10FencedPersonSeal\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x12\n\ncreated_at\x18\x03 \x01(\x03"\xd6\x01\n\x13ReleaseFenceRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x03 \x01(\t\x12\r\n\x05op_id\x18\x04 \x01(\t\x123\n\x07outcome\x18\x05 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x12\x1b\n\x0esealed_version\x18\x06 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x07 \x01(\x03B\x11\n\x0f_sealed_version"\x16\n\x14ReleaseFenceResponse"\xa2\x01\n\x14ReleaseFencesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x123\n\x07outcome\x18\x03 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x125\n\x07persons\x18\x04 \x03(\x0b2$.personhog.types.v1.ReleaseFenceItem"~\n\x10ReleaseFenceItem\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x02 \x01(\t\x12\x1b\n\x0esealed_version\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x04 \x01(\x03B\x11\n\x0f_sealed_version"\x17\n\x15ReleaseFencesResponse"S\n\x14SealedSourceSnapshot\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person\x12\x0f\n\x07ordinal\x18\x02 \x01(\x05"\xbd\x01\n\x19FoldPersonDocumentRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12B\n\x10sealed_snapshots\x18\x03 \x03(\x0b2(.personhog.types.v1.SealedSourceSnapshot\x12\x11\n\tevent_set\x18\x04 \x01(\x0c\x12\x16\n\x0eevent_set_once\x18\x05 \x01(\x0c\x12\r\n\x05op_id\x18\x06 \x01(\t"H\n\x1aFoldPersonDocumentResponse\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person*o\n\x0fLifecycleOpType\x12!\n\x1dLIFECYCLE_OP_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18LIFECYCLE_OP_TYPE_DELETE\x10\x01\x12\x1b\n\x17LIFECYCLE_OP_TYPE_MERGE\x10\x02*m\n\x0eReleaseOutcome\x12\x1f\n\x1bRELEASE_OUTCOME_UNSPECIFIED\x10\x00\x12\x1d\n\x19RELEASE_OUTCOME_COMMITTED\x10\x01\x12\x1b\n\x17RELEASE_OUTCOME_ABORTED\x10\x02b\x06proto3'+ b'\n\x1fpersonhog/types/v1/person.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xb2\x02\n\x06Person\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0f\n\x07team_id\x18\x03 \x01(\x03\x12\x12\n\nproperties\x18\x04 \x01(\x0c\x12"\n\x1aproperties_last_updated_at\x18\x05 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x06 \x01(\x0c\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x12\x0f\n\x07version\x18\x08 \x01(\x03\x12\x15\n\ris_identified\x18\t \x01(\x08\x12\x17\n\nis_user_id\x18\n \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x0b \x01(\x03H\x01\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08B\r\n\x0b_is_user_idB\x0f\n\r_last_seen_at"f\n\x15DistinctIdWithVersion\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x14\n\x07version\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x03 \x01(\x03H\x01\x88\x01\x01B\n\n\x08_versionB\x05\n\x03_id"h\n\x15PersonWithDistinctIds\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"g\n\x11PersonDistinctIds\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12?\n\x0cdistinct_ids\x18\x02 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion"\x87\x01\n\x18PersonWithTeamDistinctId\x12/\n\x03key\x18\x01 \x01(\x0b2".personhog.types.v1.TeamDistinctId\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"m\n\x10GetPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"O\n\x11GetPersonResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"o\n\x11GetPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"S\n\x0fPersonsResponse\x12+\n\x07persons\x18\x01 \x03(\x0b2\x1a.personhog.types.v1.Person\x12\x13\n\x0bmissing_ids\x18\x02 \x03(\x03"n\n\x16GetPersonByUuidRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"q\n\x18GetPersonsByUuidsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05uuids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"{\n\x1cGetPersonByDistinctIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"\x84\x01\n$GetPersonsByDistinctIdsInTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdistinct_ids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"`\n"PersonsByDistinctIdsInTeamResponse\x12:\n\x07results\x18\x01 \x03(\x0b2).personhog.types.v1.PersonWithDistinctIds"\x96\x01\n\x1eGetPersonsByDistinctIdsRequest\x12=\n\x11team_distinct_ids\x18\x01 \x03(\x0b2".personhog.types.v1.TeamDistinctId\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"]\n\x1cPersonsByDistinctIdsResponse\x12=\n\x07results\x18\x01 \x03(\x0b2,.personhog.types.v1.PersonWithTeamDistinctId"\xbf\x01\n\x1eGetDistinctIdsForPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x12\n\x05limit\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tcursor_id\x18\x05 \x01(\x03H\x01\x88\x01\x01B\x08\n\x06_limitB\x0c\n\n_cursor_id"\x92\x01\n\x1fGetDistinctIdsForPersonResponse\x12?\n\x0cdistinct_ids\x18\x01 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion\x12\x1b\n\x0enext_cursor_id\x18\x02 \x01(\x03H\x00\x88\x01\x01B\x11\n\x0f_next_cursor_id"\xb1\x01\n\x1fGetDistinctIdsForPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x1d\n\x10limit_per_person\x18\x04 \x01(\x03H\x00\x88\x01\x01B\x13\n\x11_limit_per_person"f\n GetDistinctIdsForPersonsResponse\x12B\n\x13person_distinct_ids\x18\x01 \x03(\x0b2%.personhog.types.v1.PersonDistinctIds"\x96\x02\n\x1dUpdatePersonPropertiesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x12\n\nevent_name\x18\x03 \x01(\t\x12\x16\n\x0eset_properties\x18\x04 \x01(\x0c\x12\x1b\n\x13set_once_properties\x18\x05 \x01(\x0c\x12\x18\n\x10unset_properties\x18\x06 \x03(\t\x12\x1a\n\ris_identified\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x0cforce_update\x18\t \x01(\x08B\x10\n\x0e_is_identifiedB\x0f\n\r_last_seen_at"m\n\x1eUpdatePersonPropertiesResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x12\x0f\n\x07updated\x18\x02 \x01(\x08B\t\n\x07_person"=\n\x14DeletePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t".\n\x15DeletePersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"G\n DeletePersonsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03":\n!DeletePersonsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"Y\n\x1eDeleteTombstonedPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t\x12\x10\n\x08max_rows\x18\x03 \x01(\x03"\xa6\x01\n\x1fDeleteTombstonedPersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x12\x1a\n\x12skipped_live_count\x18\x02 \x01(\x03\x12\x1c\n\x14blocked_person_uuids\x18\x03 \x03(\t\x12\x1c\n\x14pending_person_uuids\x18\x04 \x03(\t\x12\x14\n\x0crows_deleted\x18\x05 \x01(\x03"W\n\x12SplitPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x1d\n\x15distinct_ids_to_split\x18\x03 \x03(\t"\x8e\x01\n\x0bSplitResult\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x17\n\x0fnew_person_uuid\x18\x02 \x01(\t\x12\x1a\n\x12new_person_version\x18\x03 \x01(\x03\x12\x13\n\x0bpdi_version\x18\x04 \x01(\x03\x12 \n\x18new_person_created_at_ms\x18\x05 \x01(\x03"F\n\x13SplitPersonResponse\x12/\n\x06splits\x18\x01 \x03(\x0b2\x1f.personhog.types.v1.SplitResult"c\n&SetPersonDistinctIdVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"e\n\'SetPersonDistinctIdVersionFloorResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"W\n\x1cSetPersonVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"0\n\x1dSetPersonVersionFloorResponse\x12\x0f\n\x07updated\x18\x01 \x01(\x08"}\n\x12FencePersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\r\n\x05op_id\x18\x03 \x01(\t\x124\n\x07op_type\x18\x04 \x01(\x0e2#.personhog.types.v1.LifecycleOpType"A\n\x13FencePersonResponse\x12*\n\x06sealed\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person"\x7f\n\x13FencePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x124\n\x07op_type\x18\x03 \x01(\x0e2#.personhog.types.v1.LifecycleOpType\x12\x12\n\nperson_ids\x18\x04 \x03(\x03"_\n\x14FencePersonsResponse\x124\n\x06sealed\x18\x01 \x03(\x0b2$.personhog.types.v1.FencedPersonSeal\x12\x11\n\tnot_found\x18\x02 \x03(\x03"J\n\x10FencedPersonSeal\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x12\n\ncreated_at\x18\x03 \x01(\x03"\xd6\x01\n\x13ReleaseFenceRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x03 \x01(\t\x12\r\n\x05op_id\x18\x04 \x01(\t\x123\n\x07outcome\x18\x05 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x12\x1b\n\x0esealed_version\x18\x06 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x07 \x01(\x03B\x11\n\x0f_sealed_version"\x16\n\x14ReleaseFenceResponse"\xa2\x01\n\x14ReleaseFencesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x123\n\x07outcome\x18\x03 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x125\n\x07persons\x18\x04 \x03(\x0b2$.personhog.types.v1.ReleaseFenceItem"~\n\x10ReleaseFenceItem\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x02 \x01(\t\x12\x1b\n\x0esealed_version\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x04 \x01(\x03B\x11\n\x0f_sealed_version"\x17\n\x15ReleaseFencesResponse"S\n\x14SealedSourceSnapshot\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person\x12\x0f\n\x07ordinal\x18\x02 \x01(\x05"\xbd\x01\n\x19FoldPersonDocumentRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12B\n\x10sealed_snapshots\x18\x03 \x03(\x0b2(.personhog.types.v1.SealedSourceSnapshot\x12\x11\n\tevent_set\x18\x04 \x01(\x0c\x12\x16\n\x0eevent_set_once\x18\x05 \x01(\x0c\x12\r\n\x05op_id\x18\x06 \x01(\t"H\n\x1aFoldPersonDocumentResponse\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person*o\n\x0fLifecycleOpType\x12!\n\x1dLIFECYCLE_OP_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18LIFECYCLE_OP_TYPE_DELETE\x10\x01\x12\x1b\n\x17LIFECYCLE_OP_TYPE_MERGE\x10\x02*m\n\x0eReleaseOutcome\x12\x1f\n\x1bRELEASE_OUTCOME_UNSPECIFIED\x10\x00\x12\x1d\n\x19RELEASE_OUTCOME_COMMITTED\x10\x01\x12\x1b\n\x17RELEASE_OUTCOME_ABORTED\x10\x02b\x06proto3')_globals = globals()_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.person_pb2", _globals)if not _descriptor._USE_C_DESCRIPTORS:DESCRIPTOR._loaded_options = None- _globals["_LIFECYCLEOPTYPE"]._serialized_start = 5540- _globals["_LIFECYCLEOPTYPE"]._serialized_end = 5651- _globals["_RELEASEOUTCOME"]._serialized_start = 5653- _globals["_RELEASEOUTCOME"]._serialized_end = 5762+ _globals["_LIFECYCLEOPTYPE"]._serialized_start = 5651+ _globals["_LIFECYCLEOPTYPE"]._serialized_end = 5762+ _globals["_RELEASEOUTCOME"]._serialized_start = 5764+ _globals["_RELEASEOUTCOME"]._serialized_end = 5873_globals["_PERSON"]._serialized_start = 89_globals["_PERSON"]._serialized_end = 395_globals["_DISTINCTIDWITHVERSION"]._serialized_start = 397- _globals["_DISTINCTIDWITHVERSION"]._serialized_end = 475- _globals["_PERSONWITHDISTINCTIDS"]._serialized_start = 477- _globals["_PERSONWITHDISTINCTIDS"]._serialized_end = 581- _globals["_PERSONDISTINCTIDS"]._serialized_start = 583- _globals["_PERSONDISTINCTIDS"]._serialized_end = 686- _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_start = 689- _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_end = 824- _globals["_GETPERSONREQUEST"]._serialized_start = 826- _globals["_GETPERSONREQUEST"]._serialized_end = 935- _globals["_GETPERSONRESPONSE"]._serialized_start = 937- _globals["_GETPERSONRESPONSE"]._serialized_end = 1016- _globals["_GETPERSONSREQUEST"]._serialized_start = 1018- _globals["_GETPERSONSREQUEST"]._serialized_end = 1129- _globals["_PERSONSRESPONSE"]._serialized_start = 1131- _globals["_PERSONSRESPONSE"]._serialized_end = 1214- _globals["_GETPERSONBYUUIDREQUEST"]._serialized_start = 1216- _globals["_GETPERSONBYUUIDREQUEST"]._serialized_end = 1326- _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_start = 1328- _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_end = 1441- _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_start = 1443- _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_end = 1566- _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_start = 1569- _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_end = 1701- _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_start = 1703- _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_end = 1799- _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_start = 1802- _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_end = 1952- _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_start = 1954- _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_end = 2047- _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_start = 2050- _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_end = 2203- _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_start = 2205- _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_end = 2303- _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_start = 2306- _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_end = 2483- _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_start = 2485- _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_end = 2587- _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_start = 2590- _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_end = 2868- _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_start = 2870- _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_end = 2979- _globals["_DELETEPERSONSREQUEST"]._serialized_start = 2981- _globals["_DELETEPERSONSREQUEST"]._serialized_end = 3042- _globals["_DELETEPERSONSRESPONSE"]._serialized_start = 3044- _globals["_DELETEPERSONSRESPONSE"]._serialized_end = 3090- _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_start = 3092- _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_end = 3163- _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_start = 3165- _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_end = 3223- _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_start = 3225- _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_end = 3314- _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_start = 3317- _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_end = 3483- _globals["_SPLITPERSONREQUEST"]._serialized_start = 3485- _globals["_SPLITPERSONREQUEST"]._serialized_end = 3572- _globals["_SPLITRESULT"]._serialized_start = 3575- _globals["_SPLITRESULT"]._serialized_end = 3717- _globals["_SPLITPERSONRESPONSE"]._serialized_start = 3719- _globals["_SPLITPERSONRESPONSE"]._serialized_end = 3789- _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_start = 3791- _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_end = 3890- _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_start = 3892- _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_end = 3993- _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_start = 3995- _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_end = 4082- _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_start = 4084- _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_end = 4132- _globals["_FENCEPERSONREQUEST"]._serialized_start = 4134- _globals["_FENCEPERSONREQUEST"]._serialized_end = 4259- _globals["_FENCEPERSONRESPONSE"]._serialized_start = 4261- _globals["_FENCEPERSONRESPONSE"]._serialized_end = 4326- _globals["_FENCEPERSONSREQUEST"]._serialized_start = 4328- _globals["_FENCEPERSONSREQUEST"]._serialized_end = 4455- _globals["_FENCEPERSONSRESPONSE"]._serialized_start = 4457- _globals["_FENCEPERSONSRESPONSE"]._serialized_end = 4552- _globals["_FENCEDPERSONSEAL"]._serialized_start = 4554- _globals["_FENCEDPERSONSEAL"]._serialized_end = 4628- _globals["_RELEASEFENCEREQUEST"]._serialized_start = 4631- _globals["_RELEASEFENCEREQUEST"]._serialized_end = 4845- _globals["_RELEASEFENCERESPONSE"]._serialized_start = 4847- _globals["_RELEASEFENCERESPONSE"]._serialized_end = 4869- _globals["_RELEASEFENCESREQUEST"]._serialized_start = 4872- _globals["_RELEASEFENCESREQUEST"]._serialized_end = 5034- _globals["_RELEASEFENCEITEM"]._serialized_start = 5036- _globals["_RELEASEFENCEITEM"]._serialized_end = 5162- _globals["_RELEASEFENCESRESPONSE"]._serialized_start = 5164- _globals["_RELEASEFENCESRESPONSE"]._serialized_end = 5187- _globals["_SEALEDSOURCESNAPSHOT"]._serialized_start = 5189- _globals["_SEALEDSOURCESNAPSHOT"]._serialized_end = 5272- _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_start = 5275- _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_end = 5464- _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_start = 5466- _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_end = 5538+ _globals["_DISTINCTIDWITHVERSION"]._serialized_end = 499+ _globals["_PERSONWITHDISTINCTIDS"]._serialized_start = 501+ _globals["_PERSONWITHDISTINCTIDS"]._serialized_end = 605+ _globals["_PERSONDISTINCTIDS"]._serialized_start = 607+ _globals["_PERSONDISTINCTIDS"]._serialized_end = 710+ _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_start = 713+ _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_end = 848+ _globals["_GETPERSONREQUEST"]._serialized_start = 850+ _globals["_GETPERSONREQUEST"]._serialized_end = 959+ _globals["_GETPERSONRESPONSE"]._serialized_start = 961+ _globals["_GETPERSONRESPONSE"]._serialized_end = 1040+ _globals["_GETPERSONSREQUEST"]._serialized_start = 1042+ _globals["_GETPERSONSREQUEST"]._serialized_end = 1153+ _globals["_PERSONSRESPONSE"]._serialized_start = 1155+ _globals["_PERSONSRESPONSE"]._serialized_end = 1238+ _globals["_GETPERSONBYUUIDREQUEST"]._serialized_start = 1240+ _globals["_GETPERSONBYUUIDREQUEST"]._serialized_end = 1350+ _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_start = 1352+ _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_end = 1465+ _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_start = 1467+ _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_end = 1590+ _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_start = 1593+ _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_end = 1725+ _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_start = 1727+ _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_end = 1823+ _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_start = 1826+ _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_end = 1976+ _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_start = 1978+ _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_end = 2071+ _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_start = 2074+ _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_end = 2265+ _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_start = 2268+ _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_end = 2414+ _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_start = 2417+ _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_end = 2594+ _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_start = 2596+ _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_end = 2698+ _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_start = 2701+ _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_end = 2979+ _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_start = 2981+ _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_end = 3090+ _globals["_DELETEPERSONSREQUEST"]._serialized_start = 3092+ _globals["_DELETEPERSONSREQUEST"]._serialized_end = 3153+ _globals["_DELETEPERSONSRESPONSE"]._serialized_start = 3155+ _globals["_DELETEPERSONSRESPONSE"]._serialized_end = 3201+ _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_start = 3203+ _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_end = 3274+ _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_start = 3276+ _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_end = 3334+ _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_start = 3336+ _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_end = 3425+ _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_start = 3428+ _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_end = 3594+ _globals["_SPLITPERSONREQUEST"]._serialized_start = 3596+ _globals["_SPLITPERSONREQUEST"]._serialized_end = 3683+ _globals["_SPLITRESULT"]._serialized_start = 3686+ _globals["_SPLITRESULT"]._serialized_end = 3828+ _globals["_SPLITPERSONRESPONSE"]._serialized_start = 3830+ _globals["_SPLITPERSONRESPONSE"]._serialized_end = 3900+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_start = 3902+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_end = 4001+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_start = 4003+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_end = 4104+ _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_start = 4106+ _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_end = 4193+ _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_start = 4195+ _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_end = 4243+ _globals["_FENCEPERSONREQUEST"]._serialized_start = 4245+ _globals["_FENCEPERSONREQUEST"]._serialized_end = 4370+ _globals["_FENCEPERSONRESPONSE"]._serialized_start = 4372+ _globals["_FENCEPERSONRESPONSE"]._serialized_end = 4437+ _globals["_FENCEPERSONSREQUEST"]._serialized_start = 4439+ _globals["_FENCEPERSONSREQUEST"]._serialized_end = 4566+ _globals["_FENCEPERSONSRESPONSE"]._serialized_start = 4568+ _globals["_FENCEPERSONSRESPONSE"]._serialized_end = 4663+ _globals["_FENCEDPERSONSEAL"]._serialized_start = 4665+ _globals["_FENCEDPERSONSEAL"]._serialized_end = 4739+ _globals["_RELEASEFENCEREQUEST"]._serialized_start = 4742+ _globals["_RELEASEFENCEREQUEST"]._serialized_end = 4956+ _globals["_RELEASEFENCERESPONSE"]._serialized_start = 4958+ _globals["_RELEASEFENCERESPONSE"]._serialized_end = 4980+ _globals["_RELEASEFENCESREQUEST"]._serialized_start = 4983+ _globals["_RELEASEFENCESREQUEST"]._serialized_end = 5145+ _globals["_RELEASEFENCEITEM"]._serialized_start = 5147+ _globals["_RELEASEFENCEITEM"]._serialized_end = 5273+ _globals["_RELEASEFENCESRESPONSE"]._serialized_start = 5275+ _globals["_RELEASEFENCESRESPONSE"]._serialized_end = 5298+ _globals["_SEALEDSOURCESNAPSHOT"]._serialized_start = 5300+ _globals["_SEALEDSOURCESNAPSHOT"]._serialized_end = 5383+ _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_start = 5386+ _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_end = 5575+ _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_start = 5577+ _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_end = 5649diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi b/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyiindex 81a305e80f5e..5bfdfeee1104 100644--- a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi+++ b/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi@@ -96,13 +96,17 @@ class Person(_message.Message):) -> None: ...class DistinctIdWithVersion(_message.Message):- __slots__ = ("distinct_id", "version")+ __slots__ = ("distinct_id", "version", "id")DISTINCT_ID_FIELD_NUMBER: _ClassVar[int]VERSION_FIELD_NUMBER: _ClassVar[int]+ ID_FIELD_NUMBER: _ClassVar[int]distinct_id: strversion: int+ id: int- def __init__(self, distinct_id: _Optional[str] = ..., version: _Optional[int] = ...) -> None: ...+ def __init__(+ self, distinct_id: _Optional[str] = ..., version: _Optional[int] = ..., id: _Optional[int] = ...+ ) -> None: ...class PersonWithDistinctIds(_message.Message):__slots__ = ("distinct_id", "person")@@ -285,15 +289,17 @@ class PersonsByDistinctIdsResponse(_message.Message):def __init__(self, results: _Optional[_Iterable[_Union[PersonWithTeamDistinctId, _Mapping]]] = ...) -> None: ...class GetDistinctIdsForPersonRequest(_message.Message):- __slots__ = ("team_id", "person_id", "read_options", "limit")+ __slots__ = ("team_id", "person_id", "read_options", "limit", "cursor_id")TEAM_ID_FIELD_NUMBER: _ClassVar[int]PERSON_ID_FIELD_NUMBER: _ClassVar[int]READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]LIMIT_FIELD_NUMBER: _ClassVar[int]+ CURSOR_ID_FIELD_NUMBER: _ClassVar[int]team_id: intperson_id: intread_options: _common_pb2.ReadOptionslimit: int+ cursor_id: intdef __init__(self,@@ -301,14 +307,21 @@ class GetDistinctIdsForPersonRequest(_message.Message):person_id: _Optional[int] = ...,read_options: _Optional[_Union[_common_pb2.ReadOptions, _Mapping]] = ...,limit: _Optional[int] = ...,+ cursor_id: _Optional[int] = ...,) -> None: ...class GetDistinctIdsForPersonResponse(_message.Message):- __slots__ = ("distinct_ids",)+ __slots__ = ("distinct_ids", "next_cursor_id")DISTINCT_IDS_FIELD_NUMBER: _ClassVar[int]+ NEXT_CURSOR_ID_FIELD_NUMBER: _ClassVar[int]distinct_ids: _containers.RepeatedCompositeFieldContainer[DistinctIdWithVersion]+ next_cursor_id: int- def __init__(self, distinct_ids: _Optional[_Iterable[_Union[DistinctIdWithVersion, _Mapping]]] = ...) -> None: ...+ def __init__(+ self,+ distinct_ids: _Optional[_Iterable[_Union[DistinctIdWithVersion, _Mapping]]] = ...,+ next_cursor_id: _Optional[int] = ...,+ ) -> None: ...class GetDistinctIdsForPersonsRequest(_message.Message):__slots__ = ("team_id", "person_ids", "read_options", "limit_per_person")diff --git a/proto/personhog/types/v1/person.proto b/proto/personhog/types/v1/person.protoindex eb35e73cae8d..9888482474a9 100644--- a/proto/personhog/types/v1/person.proto+++ b/proto/personhog/types/v1/person.proto@@ -29,6 +29,7 @@ message Person {message DistinctIdWithVersion {string distinct_id = 1;optional int64 version = 2;+ optional int64 id = 3; // Row ID, usable as a pagination cursor.}// PersonWithDistinctIds pairs a lookup distinct_id with its resolved person@@ -116,10 +117,12 @@ message GetDistinctIdsForPersonRequest {int64 person_id = 2;ReadOptions read_options = 3;optional int64 limit = 4; // Max distinct IDs returned. 0 or absent = no limit.+ optional int64 cursor_id = 5; // Keyset cursor: return rows with id > cursor_id.}message GetDistinctIdsForPersonResponse {repeated DistinctIdWithVersion distinct_ids = 1;+ optional int64 next_cursor_id = 2; // Absent when no more pages.}message GetDistinctIdsForPersonsRequest {diff --git a/rust/personhog-identity/src/service/mod.rs b/rust/personhog-identity/src/service/mod.rsindex a835d5491348..34476d0294cd 100644--- a/rust/personhog-identity/src/service/mod.rs+++ b/rust/personhog-identity/src/service/mod.rs@@ -192,6 +192,7 @@ impl PersonHogIdentity for PersonHogIdentityService {.push(DistinctIdWithVersion {distinct_id: mapping.distinct_id,version: mapping.version,+ id: None,});}let person_distinct_ids = by_persondiff --git a/rust/personhog-replica/.sqlx/query-1b1c129f8240d3b02c414e5483269e0e51b131306c808a6eaca004fbe02973df.json b/rust/personhog-replica/.sqlx/query-1b1c129f8240d3b02c414e5483269e0e51b131306c808a6eaca004fbe02973df.jsonnew file mode 100644index 000000000000..357bd23330d4--- /dev/null+++ b/rust/personhog-replica/.sqlx/query-1b1c129f8240d3b02c414e5483269e0e51b131306c808a6eaca004fbe02973df.json@@ -0,0 +1,36 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT capped.distinct_id, capped.version, capped.id\n FROM (\n SELECT distinct_id, version, id\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n LIMIT 2500\n ) capped\n ORDER BY (capped.distinct_id ~ '^([a-z0-9]+-){4}[a-z0-9]+$'), capped.id\n LIMIT $3\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "distinct_id",+ "type_info": "Varchar"+ },+ {+ "ordinal": 1,+ "name": "version",+ "type_info": "Int8"+ },+ {+ "ordinal": 2,+ "name": "id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Int4",+ "Int8",+ "Int8"+ ]+ },+ "nullable": [+ false,+ true,+ false+ ]+ },+ "hash": "1b1c129f8240d3b02c414e5483269e0e51b131306c808a6eaca004fbe02973df"+}diff --git a/rust/personhog-replica/.sqlx/query-41348322ade61af694ed977e2f2802f7ddcb8af55425ddb34f2c9a5b697ccfe1.json b/rust/personhog-replica/.sqlx/query-41348322ade61af694ed977e2f2802f7ddcb8af55425ddb34f2c9a5b697ccfe1.jsonnew file mode 100644index 000000000000..ca21cdf52536--- /dev/null+++ b/rust/personhog-replica/.sqlx/query-41348322ade61af694ed977e2f2802f7ddcb8af55425ddb34f2c9a5b697ccfe1.json@@ -0,0 +1,37 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT distinct_id, version, id\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n AND id > $3\n ORDER BY id ASC\n LIMIT $4\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "distinct_id",+ "type_info": "Varchar"+ },+ {+ "ordinal": 1,+ "name": "version",+ "type_info": "Int8"+ },+ {+ "ordinal": 2,+ "name": "id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Int4",+ "Int8",+ "Int8",+ "Int8"+ ]+ },+ "nullable": [+ false,+ true,+ false+ ]+ },+ "hash": "41348322ade61af694ed977e2f2802f7ddcb8af55425ddb34f2c9a5b697ccfe1"+}diff --git a/rust/personhog-replica/.sqlx/query-6a693959ff219e10361fe20e2d159e0f86eb7dbad97e6cd7023adfc1cd42a272.json b/rust/personhog-replica/.sqlx/query-6a693959ff219e10361fe20e2d159e0f86eb7dbad97e6cd7023adfc1cd42a272.jsonnew file mode 100644index 000000000000..9ace4b9d1cf0--- /dev/null+++ b/rust/personhog-replica/.sqlx/query-6a693959ff219e10361fe20e2d159e0f86eb7dbad97e6cd7023adfc1cd42a272.json@@ -0,0 +1,35 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT distinct_id, version, id\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "distinct_id",+ "type_info": "Varchar"+ },+ {+ "ordinal": 1,+ "name": "version",+ "type_info": "Int8"+ },+ {+ "ordinal": 2,+ "name": "id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Int4",+ "Int8"+ ]+ },+ "nullable": [+ false,+ true,+ false+ ]+ },+ "hash": "6a693959ff219e10361fe20e2d159e0f86eb7dbad97e6cd7023adfc1cd42a272"+}diff --git a/rust/personhog-replica/.sqlx/query-7637478e1f0961cfc6bd12a9f017dce8577d3543f809569bc21d4393a793ae83.json b/rust/personhog-replica/.sqlx/query-7637478e1f0961cfc6bd12a9f017dce8577d3543f809569bc21d4393a793ae83.jsondeleted file mode 100644index b707ab983b82..000000000000--- a/rust/personhog-replica/.sqlx/query-7637478e1f0961cfc6bd12a9f017dce8577d3543f809569bc21d4393a793ae83.json+++ /dev/null@@ -1,30 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT capped.distinct_id, capped.version\n FROM (\n SELECT distinct_id, version, id\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n LIMIT 2500\n ) capped\n ORDER BY (capped.distinct_id ~ '^([a-z0-9]+-){4}[a-z0-9]+$'), capped.id\n LIMIT $3\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "distinct_id",- "type_info": "Varchar"- },- {- "ordinal": 1,- "name": "version",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Int4",- "Int8",- "Int8"- ]- },- "nullable": [- false,- true- ]- },- "hash": "7637478e1f0961cfc6bd12a9f017dce8577d3543f809569bc21d4393a793ae83"-}diff --git a/rust/personhog-replica/.sqlx/query-820bc26a1239fa88a2add1a672e634df3cdce0385025656da2d7aba9f1df8f79.json b/rust/personhog-replica/.sqlx/query-820bc26a1239fa88a2add1a672e634df3cdce0385025656da2d7aba9f1df8f79.jsondeleted file mode 100644index a7fc8ad1f817..000000000000--- a/rust/personhog-replica/.sqlx/query-820bc26a1239fa88a2add1a672e634df3cdce0385025656da2d7aba9f1df8f79.json+++ /dev/null@@ -1,29 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT distinct_id, version\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "distinct_id",- "type_info": "Varchar"- },- {- "ordinal": 1,- "name": "version",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Int4",- "Int8"- ]- },- "nullable": [- false,- true- ]- },- "hash": "820bc26a1239fa88a2add1a672e634df3cdce0385025656da2d7aba9f1df8f79"-}diff --git a/rust/personhog-replica/.sqlx/query-e6d3a33092786272cecb85d807a2d148e47aceb85c5c30bd474f322c9a74e0fd.json b/rust/personhog-replica/.sqlx/query-e6d3a33092786272cecb85d807a2d148e47aceb85c5c30bd474f322c9a74e0fd.jsonnew file mode 100644index 000000000000..aa4a7e46e18a--- /dev/null+++ b/rust/personhog-replica/.sqlx/query-e6d3a33092786272cecb85d807a2d148e47aceb85c5c30bd474f322c9a74e0fd.json@@ -0,0 +1,36 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT distinct_id, version, id\n FROM posthog_persondistinctid\n WHERE team_id = $1 AND person_id = $2 AND is_deleted = false\n AND id > $3\n ORDER BY id ASC\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "distinct_id",+ "type_info": "Varchar"+ },+ {+ "ordinal": 1,+ "name": "version",+ "type_info": "Int8"+ },+ {+ "ordinal": 2,+ "name": "id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Int4",+ "Int8",+ "Int8"+ ]+ },+ "nullable": [+ false,+ true,+ false+ ]+ },+ "hash": "e6d3a33092786272cecb85d807a2d148e47aceb85c5c30bd474f322c9a74e0fd"+}diff --git a/rust/personhog-replica/src/service/mod.rs b/rust/personhog-replica/src/service/mod.rsindex ea44f36157be..ac7b353d13a8 100644--- a/rust/personhog-replica/src/service/mod.rs+++ b/rust/personhog-replica/src/service/mod.rs@@ -318,21 +318,34 @@ impl PersonHogReplica for PersonHogReplicaService {let req = request.into_inner();let consistency = to_storage_consistency(&req.read_options);let limit = req.limit.filter(|&l| l > 0);+ let cursor_id = req.cursor_id;let distinct_ids = self.storage- .get_distinct_ids_for_person(req.team_id, req.person_id, consistency, limit)+ .get_distinct_ids_for_person(req.team_id, req.person_id, consistency, limit, cursor_id).await.map_err(|e| log_and_convert_error(e, "get_distinct_ids_for_person"))?;+ let next_cursor_id = if let Some(l) = limit {+ if distinct_ids.len() as i64 >= l {+ distinct_ids.last().map(|d| d.id)+ } else {+ None+ }+ } else {+ None+ };+Ok(Response::new(GetDistinctIdsForPersonResponse {distinct_ids: distinct_ids.into_iter().map(|d| DistinctIdWithVersion {distinct_id: d.distinct_id,version: d.version,+ id: Some(d.id),}).collect(),+ next_cursor_id,}))}@@ -364,6 +377,7 @@ impl PersonHogReplica for PersonHogReplicaService {.push(DistinctIdWithVersion {distinct_id: mapping.distinct_id,version: mapping.version,+ id: None,});}diff --git a/rust/personhog-replica/src/service/tests/mocks.rs b/rust/personhog-replica/src/service/tests/mocks.rsindex af71e1063cf7..ec5978a5b67a 100644--- a/rust/personhog-replica/src/service/tests/mocks.rs+++ b/rust/personhog-replica/src/service/tests/mocks.rs@@ -148,6 +148,7 @@ impl storage::DistinctIdLookup for FailingStorage {_person_id: i64,_consistency: storage::postgres::ConsistencyLevel,_limit: Option<i64>,+ _cursor_id: Option<i64>,) -> storage::StorageResult<Vec<storage::DistinctIdWithVersion>> {Err(self.error.clone())}@@ -531,6 +532,7 @@ impl storage::DistinctIdLookup for SuccessStorage {_person_id: i64,_consistency: storage::postgres::ConsistencyLevel,_limit: Option<i64>,+ _cursor_id: Option<i64>,) -> storage::StorageResult<Vec<storage::DistinctIdWithVersion>> {Ok(Vec::new())}@@ -973,6 +975,7 @@ impl storage::DistinctIdLookup for PopulatedStorage {_person_id: i64,_consistency: storage::postgres::ConsistencyLevel,_limit: Option<i64>,+ _cursor_id: Option<i64>,) -> storage::StorageResult<Vec<storage::DistinctIdWithVersion>> {Ok(Vec::new())}@@ -1391,6 +1394,7 @@ impl storage::DistinctIdLookup for ConsistencyTrackingStorage {_person_id: i64,consistency: storage::postgres::ConsistencyLevel,_limit: Option<i64>,+ _cursor_id: Option<i64>,) -> storage::StorageResult<Vec<storage::DistinctIdWithVersion>> {self.record(consistency);Ok(Vec::new())diff --git a/rust/personhog-replica/src/service/tests/routing.rs b/rust/personhog-replica/src/service/tests/routing.rsindex e433dd32577e..c12d2f76cc6a 100644--- a/rust/personhog-replica/src/service/tests/routing.rs+++ b/rust/personhog-replica/src/service/tests/routing.rs@@ -293,6 +293,7 @@ async fn test_get_distinct_ids_for_person_accepts_strong_consistency() {person_id: 1,read_options: strong_consistency(),limit: None,+ cursor_id: None,})).await;@@ -464,6 +465,7 @@ async fn test_get_distinct_ids_for_person_routes_strong_to_primary() {person_id: 1,read_options: strong_consistency(),limit: None,+ cursor_id: None,})).await.expect("RPC should succeed");@@ -485,6 +487,7 @@ async fn test_get_distinct_ids_for_person_routes_eventual_to_replica() {person_id: 1,read_options: eventual_consistency(),limit: None,+ cursor_id: None,})).await.expect("RPC should succeed");@@ -506,6 +509,7 @@ async fn test_get_distinct_ids_for_person_routes_unspecified_to_replica() {person_id: 1,read_options: None,limit: None,+ cursor_id: None,})).await.expect("RPC should succeed");diff --git a/rust/personhog-replica/src/storage/postgres/distinct_id.rs b/rust/personhog-replica/src/storage/postgres/distinct_id.rsindex 8a67feba1874..0f0ff0862263 100644--- a/rust/personhog-replica/src/storage/postgres/distinct_id.rs+++ b/rust/personhog-replica/src/storage/postgres/distinct_id.rs@@ -18,6 +18,7 @@ impl DistinctIdLookup for PostgresStorage {person_id: i64,consistency: ConsistencyLevel,limit: Option<i64>,+ cursor_id: Option<i64>,) -> StorageResult<Vec<DistinctIdWithVersion>> {let client = current_client_name();let method = current_method_name();@@ -36,16 +37,54 @@ impl DistinctIdLookup for PostgresStorage {let pool = self.pool_for_consistency(consistency);let mut conn = PostgresStorage::acquire_timed(pool, pool_label).await?;- // Identified (non-anonymous) distinct_ids must survive the LIMIT, so consumers that- // read the first id get the user-defined one. The regex mirrors ANONYMOUS_REGEX in- // posthog/utils.py (keep in sync). The inner LIMIT bounds the scan for pathological- // persons with enormous distinct_id sets; beyond it the selection is best-effort.- let rows = match limit {- Some(l) => {+ // When only a limit is provided (no cursor), identified (non-anonymous)+ // distinct_ids must survive the LIMIT, so consumers that read the first id+ // get the user-defined one. The regex mirrors ANONYMOUS_REGEX in+ // posthog/utils.py (keep in sync).+ let rows = match (cursor_id, limit) {+ // No composite index on (person_id, id) — cursor branches scan all rows for the+ // person per page instead of seeking. Fine for bulk-delete; add the index if needed.+ (Some(cursor), Some(l)) => {sqlx::query_as!(DistinctIdWithVersion,r#"- SELECT capped.distinct_id, capped.version+ SELECT distinct_id, version, id+ FROM posthog_persondistinctid+ WHERE team_id = $1 AND person_id = $2 AND is_deleted = false+ AND id > $3+ ORDER BY id ASC+ LIMIT $4+ "#,+ team_id as i32,+ person_id,+ cursor,+ l+ )+ .fetch_all(&mut *conn)+ .await?+ }+ (Some(cursor), None) => {+ sqlx::query_as!(+ DistinctIdWithVersion,+ r#"+ SELECT distinct_id, version, id+ FROM posthog_persondistinctid+ WHERE team_id = $1 AND person_id = $2 AND is_deleted = false+ AND id > $3+ ORDER BY id ASC+ "#,+ team_id as i32,+ person_id,+ cursor+ )+ .fetch_all(&mut *conn)+ .await?+ }+ (None, Some(l)) => {+ sqlx::query_as!(+ DistinctIdWithVersion,+ r#"+ SELECT capped.distinct_id, capped.version, capped.idFROM (SELECT distinct_id, version, idFROM posthog_persondistinctid@@ -62,11 +101,11 @@ impl DistinctIdLookup for PostgresStorage {.fetch_all(&mut *conn).await?}- _ => {+ (None, None) => {sqlx::query_as!(DistinctIdWithVersion,r#"- SELECT distinct_id, version+ SELECT distinct_id, version, idFROM posthog_persondistinctidWHERE team_id = $1 AND person_id = $2 AND is_deleted = false"#,diff --git a/rust/personhog-replica/src/storage/traits/distinct_id.rs b/rust/personhog-replica/src/storage/traits/distinct_id.rsindex d255cbe09569..5b38eab998ab 100644--- a/rust/personhog-replica/src/storage/traits/distinct_id.rs+++ b/rust/personhog-replica/src/storage/traits/distinct_id.rs@@ -13,6 +13,7 @@ pub trait DistinctIdLookup: Send + Sync {person_id: i64,consistency: ConsistencyLevel,limit: Option<i64>,+ cursor_id: Option<i64>,) -> StorageResult<Vec<DistinctIdWithVersion>>;async fn get_distinct_ids_for_persons(diff --git a/rust/personhog-replica/src/storage/types/person.rs b/rust/personhog-replica/src/storage/types/person.rsindex e3010e72c344..eabb3ad89f3d 100644--- a/rust/personhog-replica/src/storage/types/person.rs+++ b/rust/personhog-replica/src/storage/types/person.rs@@ -13,6 +13,7 @@ pub struct DistinctIdMapping {pub struct DistinctIdWithVersion {pub distinct_id: String,pub version: Option<i64>,+ pub id: i64,}/// Outcome of one bounded DeleteTombstonedPersons call. Every requested uuid lands in at mostdiff --git a/rust/personhog-replica/tests/service_tests.rs b/rust/personhog-replica/tests/service_tests.rsindex 0098011113ce..c9978d0b5bfb 100644--- a/rust/personhog-replica/tests/service_tests.rs+++ b/rust/personhog-replica/tests/service_tests.rs@@ -280,6 +280,7 @@ async fn test_get_distinct_ids_for_person() {person_id: person.id,read_options: None,limit: None,+ cursor_id: None,})).await.expect("RPC failed");@@ -315,6 +316,7 @@ async fn test_get_distinct_ids_for_person_with_limit(person_id: person.id,read_options: None,limit,+ cursor_id: None,})).await.expect("RPC failed");@@ -323,6 +325,111 @@ async fn test_get_distinct_ids_for_person_with_limit(ctx.cleanup().await.ok();}+#[tokio::test]+async fn test_get_distinct_ids_for_person_cursor_pagination() {+ let ctx = ServiceTestContext::new().await;+ // Mix of anonymous-format UUIDs and identified strings. The anonymous-+ // deprioritizing sort would reorder these differently than ORDER BY id ASC.+ let person = ctx+ .insert_person("0190f8e1-1234-7abc-89de-f0123456789a", None)+ .await+ .unwrap();+ ctx.add_distinct_id_to_person(person.id, "[email protected]")+ .await+ .unwrap();+ ctx.add_distinct_id_to_person(person.id, "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")+ .await+ .unwrap();+ ctx.add_distinct_id_to_person(person.id, "another_identified")+ .await+ .unwrap();+ ctx.add_distinct_id_to_person(person.id, "01234567-abcd-efab-cdef-0123456789ab")+ .await+ .unwrap();++ let resp1 = ctx+ .service+ .get_distinct_ids_for_person(Request::new(GetDistinctIdsForPersonRequest {+ team_id: ctx.team_id,+ person_id: person.id,+ read_options: None,+ limit: Some(2),+ cursor_id: Some(0),+ }))+ .await+ .expect("page 1 failed");+ let page1 = resp1.into_inner();+ assert_eq!(page1.distinct_ids.len(), 2);+ assert!(+ page1.next_cursor_id.is_some(),+ "page was full, next_cursor_id should be present"+ );++ let cursor1 = page1.next_cursor_id.unwrap();+ let resp2 = ctx+ .service+ .get_distinct_ids_for_person(Request::new(GetDistinctIdsForPersonRequest {+ team_id: ctx.team_id,+ person_id: person.id,+ read_options: None,+ limit: Some(2),+ cursor_id: Some(cursor1),+ }))+ .await+ .expect("page 2 failed");+ let page2 = resp2.into_inner();+ assert_eq!(page2.distinct_ids.len(), 2);+ assert!(page2.next_cursor_id.is_some());++ let cursor2 = page2.next_cursor_id.unwrap();+ let resp3 = ctx+ .service+ .get_distinct_ids_for_person(Request::new(GetDistinctIdsForPersonRequest {+ team_id: ctx.team_id,+ person_id: person.id,+ read_options: None,+ limit: Some(2),+ cursor_id: Some(cursor2),+ }))+ .await+ .expect("page 3 failed");+ let page3 = resp3.into_inner();+ assert_eq!(page3.distinct_ids.len(), 1);+ assert!(+ page3.next_cursor_id.is_none(),+ "last page should have no cursor"+ );++ let mut all_dids: Vec<String> = page1+ .distinct_ids+ .iter()+ .chain(page2.distinct_ids.iter())+ .chain(page3.distinct_ids.iter())+ .map(|d| d.distinct_id.clone())+ .collect();+ all_dids.sort();+ let mut expected = vec![+ "0190f8e1-1234-7abc-89de-f0123456789a",+ "01234567-abcd-efab-cdef-0123456789ab",+ "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",+ "another_identified",+ "[email protected]",+ ];+ expected.sort();+ assert_eq!(all_dids, expected);++ for page in [&page1.distinct_ids, &page2.distinct_ids] {+ for pair in page.windows(2) {+ assert!(+ pair[0].id.unwrap() < pair[1].id.unwrap(),+ "rows within a page should be in ascending id order"+ );+ }+ }++ ctx.cleanup().await.ok();+}+// ============================================================// Group tests// ============================================================@@ -690,6 +797,7 @@ async fn test_get_distinct_ids_for_person_limit_keeps_identified() {person_id: person.id,read_options: None,limit: Some(1),+ cursor_id: None,})).await.expect("RPC failed");diff --git a/rust/personhog-replica/tests/storage_tests.rs b/rust/personhog-replica/tests/storage_tests.rsindex 391bf1e92633..75ce97a474b7 100644--- a/rust/personhog-replica/tests/storage_tests.rs+++ b/rust/personhog-replica/tests/storage_tests.rs@@ -127,7 +127,13 @@ async fn test_get_distinct_ids_for_person() {let result = ctx.storage- .get_distinct_ids_for_person(ctx.team_id, person.id, ConsistencyLevel::Eventual, None)+ .get_distinct_ids_for_person(+ ctx.team_id,+ person.id,+ ConsistencyLevel::Eventual,+ None,+ None,+ ).await.expect("Failed to get distinct IDs");@@ -3391,3 +3397,89 @@ async fn test_delete_tombstoned_persons_gives_up_when_a_writer_holds_the_row() {ctx.cleanup().await.ok();}++#[tokio::test]+async fn test_get_distinct_ids_for_person_paginated() {+ let ctx = TestContext::new().await;+ // Mix anonymous-format UUIDs with identified strings so the anonymous-+ // deprioritizing sort and ORDER BY id ASC produce different orderings.+ let person = ctx+ .insert_person("0190f8e1-1234-7abc-89de-f0123456789a", None)+ .await+ .expect("insert person");+ ctx.add_distinct_id_to_person(person.id, "[email protected]")+ .await+ .expect("add distinct id");+ ctx.add_distinct_id_to_person(person.id, "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")+ .await+ .expect("add distinct id");+ ctx.add_distinct_id_to_person(person.id, "another_identified")+ .await+ .expect("add distinct id");+ ctx.add_distinct_id_to_person(person.id, "01234567-abcd-efab-cdef-0123456789ab")+ .await+ .expect("add distinct id");++ // cursor_id=0 selects the keyset branch (ORDER BY id ASC), same as all+ // subsequent pages, so cross-page ordering is consistent.+ let page1 = ctx+ .storage+ .get_distinct_ids_for_person(+ ctx.team_id,+ person.id,+ ConsistencyLevel::Eventual,+ Some(2),+ Some(0),+ )+ .await+ .expect("page 1");+ assert_eq!(page1.len(), 2);++ let cursor = page1.last().unwrap().id;+ let page2 = ctx+ .storage+ .get_distinct_ids_for_person(+ ctx.team_id,+ person.id,+ ConsistencyLevel::Eventual,+ Some(2),+ Some(cursor),+ )+ .await+ .expect("page 2");+ assert_eq!(page2.len(), 2);+ assert!(page2[0].id > cursor);++ let cursor2 = page2.last().unwrap().id;+ let page3 = ctx+ .storage+ .get_distinct_ids_for_person(+ ctx.team_id,+ person.id,+ ConsistencyLevel::Eventual,+ Some(2),+ Some(cursor2),+ )+ .await+ .expect("page 3");+ assert_eq!(page3.len(), 1);++ let mut all_dids: Vec<String> = page1+ .iter()+ .chain(page2.iter())+ .chain(page3.iter())+ .map(|d| d.distinct_id.clone())+ .collect();+ all_dids.sort();+ let mut expected = vec![+ "0190f8e1-1234-7abc-89de-f0123456789a",+ "01234567-abcd-efab-cdef-0123456789ab",+ "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",+ "another_identified",+ "[email protected]",+ ];+ expected.sort();+ assert_eq!(all_dids, expected);++ ctx.cleanup().await.ok();+}diff --git a/rust/personhog-router/tests/common/mod.rs b/rust/personhog-router/tests/common/mod.rsindex 13ade3e60f88..196f35157ace 100644--- a/rust/personhog-router/tests/common/mod.rs+++ b/rust/personhog-router/tests/common/mod.rs@@ -208,6 +208,7 @@ impl PersonHogReplica for TestReplicaService {) -> Result<Response<GetDistinctIdsForPersonResponse>, Status> {Ok(Response::new(GetDistinctIdsForPersonResponse {distinct_ids: vec![],+ next_cursor_id: None,}))}