Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followers Cannot use Channels / PUB SUB #468

Open
hibooboo2 opened this issue Jun 12, 2019 · 4 comments
Open

Followers Cannot use Channels / PUB SUB #468

hibooboo2 opened this issue Jun 12, 2019 · 4 comments

Comments

@hibooboo2
Copy link

Situation:
start server-A
start server-B
make server-B follow server-A

On server a:
set player test point 0 0
set player test2 point 0 0
setchan notify nearby player fence roam player test 10000

In a terminal:
tile38-cli -h serverA
subcribe notify

In another terminal:
tile38-cli -h serverB
scubscribe notify

in another terminal:
tile38-cli -h serverA
set player anotherPlayer point 0 0

Expect to get an event in both terminals with subscribe only get it for the one connected to serverA.

I know that the follower is getting the events and setting them correctly but it seems that it will not support channels at all..

@trendstate
Copy link

hi, i am also getting this issue. cannot get the 2nd server to provide updates via the SUB. Can only get data via the GET.

@DoisKoh
Copy link

DoisKoh commented Jun 26, 2024

Hello, I'm having the same problem almost 5 years later. I'm wondering if this is expected behaviour or this is a result of a misconfiguration on our end?

I'm also wondering why followers are not allowed to SETCHAN or SETHOOK. I was thinking these are essentially read-only commands / queries and would have been a good way to distribute load but I guess I might be fundamentally misunderstanding something here.

I would appreciate it if someone could provide some insight here... thanks!

tidwall added a commit that referenced this issue Jun 26, 2024
This commit fixes a bug where the leader was not propagating to
the followers.

See #468
@tidwall
Copy link
Owner

tidwall commented Jun 26, 2024

I confirmed this issue on my side and pushed a fix.

@tidwall
Copy link
Owner

tidwall commented Jun 26, 2024

Followers cannot handle SETCHAN or SETHOOK because those commands create objects that persist to the AOF data file. They both create geometries that are used for managing the geofencing and they need to persist between server restarts. Followers can only watch for incoming commands and replicate the leader and will not write commands that diverge from the leader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants