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

[Bug] Coordinator miss to change the partition's replicas hold by restarted server to online #334

Open
1 of 2 tasks
luoyuxia opened this issue Jan 22, 2025 · 5 comments · May be fixed by #337
Open
1 of 2 tasks

[Bug] Coordinator miss to change the partition's replicas hold by restarted server to online #334

luoyuxia opened this issue Jan 22, 2025 · 5 comments · May be fixed by #337
Assignees
Labels
bug Something isn't working component=server good first issue Good for newcomers
Milestone

Comments

@luoyuxia
Copy link
Collaborator

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

main

Minimal reproduce step

Create a partitioneded table with table.replication.factor = 3, and stop a tablet server hold one of the replica..The replica will be kicked off from ISR. After restart the server again, the replica should be added to ISR, but I found it didn't..

What doesn't meet your expectations?

When a tablet server started, the CoordinatorEventProcessor will find all replicas in this server via method replicasOnTabletServer , and change the state of the replicas to online..
But this method only consider non-partitioned-table, miss the replica for the partitioned table...
We should add the logic for get replica for partitioned table in this method..

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@luoyuxia luoyuxia added bug Something isn't working component=server good first issue Good for newcomers labels Jan 22, 2025
@luoyuxia luoyuxia added this to the v0.6 milestone Jan 22, 2025
@swuferhong
Copy link
Collaborator

Hi, @luoyuxia I can help to resolve this bug, can you assign it to me?

@luoyuxia
Copy link
Collaborator Author

luoyuxia commented Jan 23, 2025

Hi, @luoyuxia I can help to resolve this bug, can you assign it to me?

Thanks..
Let's wait for a while to see if there any other commnuity newers are willing to contribute to it since it should be a quick fix and I also post solution in the issue description..

If no any others are willing to take it before v0.6, I'll assign to you to fix it..

@swuferhong
Copy link
Collaborator

Hi, @luoyuxia I can help to resolve this bug, can you assign it to me?

Thanks.. Let's wait for a while to see if there any other commnuity newers are willing to contribute to it since it should be a quick fix and I also post solution in the issue description..

If no any others are willing to take it before v0.6, I'll assign to you to fix it..

Ok, that's great.

@psxjoy
Copy link
Contributor

psxjoy commented Jan 23, 2025

I think it can fix by following the code :

        // Iterate over partitioned tables
        partitionAssignments.forEach(
            (tablePartition, assignments) ->
                assignments.forEach(
                    (bucket, replicas) -> {
                        if (replicas.contains(server)) {
                            replicasInServer.add(
                                new TableBucketReplica(
                                    new TableBucket(
                                        tablePartition.getTableId(),
                                        tablePartition.getPartitionId(),
                                        bucket),
                                    server));
                        }
                    }
                )
        );

If you think this is right, please assign this issue to me at any time:)

@luoyuxia
Copy link
Collaborator Author

@psxjoy Thanks.. Assigned to you.. Enjoy coding~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component=server good first issue Good for newcomers
Projects
None yet
3 participants