Jesse Tuglu
06/03/2025, 11:11 PMDataSourceMetadata are solely supervisor-based (either materialized view or seekable stream). ObjectMetadata seems to only be used in tests. The way I see it there are ≥ 2 options:
• Commit a datasource metadata row per supervisor (likely the easiest, but will take some re-workings on the SegmentTransactionalInsertAction API and others, who assume these rows are keyed by datasource) – I'm currently doing this and it seems to work fine.
• Commit a single row per datasource, storing partitions per supervisor ID and doing merges in the plus minus methods
◦ Something like the payload being:
▪︎ map[supervisor_id] = SeekableStreamSequenceNumbers
◦ This might suffer from write contention since N supervisors * M tasks per supervisor will be attempting to write new updates in the commit payload to this row in the DB.Gian Merlino
06/03/2025, 11:30 PMJesse Tuglu
06/03/2025, 11:30 PMJesse Tuglu
06/03/2025, 11:31 PMJesse Tuglu
06/03/2025, 11:31 PMGian Merlino
06/03/2025, 11:58 PMGian Merlino
06/03/2025, 11:59 PMJesse Tuglu
06/04/2025, 12:02 AMdataSource column with supervisorId instead (which would be the datasource name for backwards compatibility anyways). I'm not sure if there's every a need to query all supervisor DatasourceMetadata for a given datasource (all metadata operations are currently local to a single supervisor). That being said, I could totally see someone wanting to say, reset all supervisors' metadata offsets for a specific datasource (in which case having the single column keyed by supervisor ID would make that tough).Jesse Tuglu
06/04/2025, 12:06 AM|dataSource|created_date|commit_metadata_payload|commit_metadata_sha1
vs
|dataSource|supervisorId|created_date|commit_metadata_payload|commit_metadata_sha1
the latter would give a bit more redundancy in storing the mapping of datasource -> list of supervisor IDs, since that mapping would really only be persisted in the supervisors table itself otherwise.Jesse Tuglu
06/04/2025, 12:07 AMJesse Tuglu
06/04/2025, 3:20 AMJesse Tuglu
06/10/2025, 4:51 AM