Skip to content

Learner Node is not working #9393

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

Open
MichelDiz opened this issue Apr 19, 2025 · 1 comment
Open

Learner Node is not working #9393

MichelDiz opened this issue Apr 19, 2025 · 1 comment
Labels

Comments

@MichelDiz
Copy link
Contributor

Describe the bug

Supposedly, the Learner node would be an instance of Dgraph outside of the RAFT Group. There is no in-depth material on the subject. This makes it difficult to effectively test it. However, in theory, we should have an instance that would supposedly be a replica for readonly.

What is still unknown to me is whether the replica would be total for the entire cluster or individual for each group/shard. The second option would be a bit strange. But plausible.

To Reproduce

Steps to reproduce the behavior:

I have created a cluster with 1 zero and 3 alphas. After I tried run a Learner Alpha and no luck.

go run main.go alpha --zero 0.0.0.0:5080 --security "whitelist=0.0.0.0/0;" --my 0.0.0.0:7090 --tmp alphaLearner/t -p=alphaLearner/p -w=alphaLearner/w -o=10 --raft "learner=true;"

In order to effectively test it, I had to comment out a line in the code that was forcing a fatal error.

	// if n.RaftContext.IsLearner && !hasPeer {
	// 	glog.Fatal("Cannot start a learner node without peer alpha nodes")
	// }

I think the issue here(the fatal one) is due to lack of flag value propagation.

Expected behavior

To work

Environment

  • OS: macOS
  • Language Go
  • Version Latest Main - v25.0.0-preview1

Additional context

Investigations

At this line

m := &pb.Member{

I saw that the Learner flag was activated.
But in the state it is "learner": false, sounds like the flag is not being propagated.

@MichelDiz MichelDiz added the bug label Apr 19, 2025
Copy link

linear bot commented Apr 19, 2025

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

No branches or pull requests

1 participant