Open nrainer-materialize opened 6 days ago
@nrainer-materialize I don't know that this is an issue, or at least it's working as desired based on the current implementation:
The limit on sources actually appears to be a limit on the number of 'persist-shards' in-use by a source: https://github.com/MaterializeInc/materialize/blob/598b74acaaa574b7dd63c576a3fc5f35ae0c8c92/src/adapter/src/coord/ddl.rs#L1562-L1577
The limitation uses this method to determine how many 'persist shards' are actually needed by a given source: https://github.com/MaterializeInc/materialize/blob/598b74acaaa574b7dd63c576a3fc5f35ae0c8c92/src/catalog/src/memory/objects.rs#L793-L832
Given that the CREATE SOURCE mz_source FROM POSTGRES CONNECTION pg (PUBLICATION 'mz_source');
statement does not create any subsources, there are no data shards being created for the statement, such that it doesn't affect the overall limit.
If we want to make this limit sources based on the number of source-statements, then we would have to change this logic, but since I did not implement or design the original behavior I am not sure that is something we want. @morsapaes do you have an opinion on this?
What version of Materialize are you using?
e8e67370fc
What is the issue?
Given
the statement
should fail with "creating source would violate max_sources limit (desired: 3, limit: 2, current: 0)" but does not.