Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmsc818fall2023projects
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Keleher
cmsc818fall2023projects
Commits
12558fc3
Commit
12558fc3
authored
1 year ago
by
Peter J. Keleher
Browse files
Options
Downloads
Patches
Plain Diff
auto
parent
8359ceb2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p5.md
+11
-3
11 additions, 3 deletions
p5.md
with
11 additions
and
3 deletions
p5.md
+
11
−
3
View file @
12558fc3
# RAFT
# RAFT
**v1.1**
**v1.1
1
**
## Due: Nov 19, 2023, 11:59:59 pm
## Due: Nov 19, 2023, 11:59:59 pm
Latest changes:
-
Follower replica getting a command request should forward to the
leader (and wait). The incoming context should be used in the
forward. This change should took about two lines of code.
## Setup
## Setup
Download files
[
here
](
https://sedna.cs.umd.edu/818/projects/p5.tgz?1
)
.
Download files
[
here
](
https://sedna.cs.umd.edu/818/projects/p5.tgz?1
)
.
...
@@ -55,8 +60,11 @@ Your servers and clients are called as follows:
...
@@ -55,8 +60,11 @@ Your servers and clients are called as follows:
of the system and the command is a simple uninterpreted string.
of the system and the command is a simple uninterpreted string.
For example:
`go run client.go
For example:
`go run client.go
localhost:8002 one`
submits the command "one" to
localhost:8002 one`
submits the command "one" to
`localhost:8002`
. If this host is not the leader it returns
*false*
`localhost:8002`
. If this host is not the leader, the request should
to the client, which prints this out. The RPC to the server will not
be forwarded to the true leader using the same context. So the
client will be waiting on the local raft gothread, which is waiting
on the remote replica gothread, which is waiting on the channel that
will be activated when the command commits. The RPC to the server will not
return until the command is committed, at which point the client
return until the command is committed, at which point the client
will print out "true".
will print out "true".
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment