spqr icon indicating copy to clipboard operation
spqr copied to clipboard

add/drop shard are implemented in adapter

Open xelavopelk opened this issue 1 month ago • 3 comments

issue #1725

xelavopelk avatar Nov 09 '25 15:11 xelavopelk

Hi! Does router list shards from coordinator or from local config? It's important because when we add new shard via coordinator, coordinator will ask routers to add this new shard. But after restart router seems to read shards from config and not from coordinator, according to this https://github.com/pg-sharding/spqr/blob/master/router/instance/instance.go#L143 This will result in some misconfiguration because router will not know about all shards that coordinator knows. I was working on shards management via coordinator in this pr but wasn't managed to finish the work

diPhantxm avatar Nov 19 '25 14:11 diPhantxm

Hi! Does router list shards from coordinator or from local config? It's important because when we add new shard via coordinator, coordinator will ask routers to add this new shard. But after restart router seems to read shards from config and not from coordinator, according to this https://github.com/pg-sharding/spqr/blob/master/router/instance/instance.go#L143 This will result in some misconfiguration because router will not know about all shards that coordinator knows. I was working on shards management via coordinator in this pr but wasn't managed to finish the work

So command "regress=> CREATE SHARD sh5 WITH HOSTS big_ass:6432;" on coordinator works incorrect too?

xelavopelk avatar Nov 19 '25 14:11 xelavopelk

Hi! Does router list shards from coordinator or from local config? It's important because when we add new shard via coordinator, coordinator will ask routers to add this new shard. But after restart router seems to read shards from config and not from coordinator, according to this https://github.com/pg-sharding/spqr/blob/master/router/instance/instance.go#L143 This will result in some misconfiguration because router will not know about all shards that coordinator knows. I was working on shards management via coordinator in this pr but wasn't managed to finish the work

ok when i add shard on coordinator(on master!!!!!) it's router don't show in. it's master:

coordinator: image router: image

xelavopelk avatar Nov 19 '25 15:11 xelavopelk

cluster mode in add/drop shard not works. blocker: https://github.com/pg-sharding/spqr/pull/1518

xelavopelk avatar Nov 23 '25 07:11 xelavopelk