Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs733
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sushant Mahajan
cs733
Commits
a05d4e10
Commit
a05d4e10
authored
Feb 09, 2015
by
Harshit Pande
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finding bugs in server communication
parent
dffef763
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
assignment2/src/raft/kvstore.go
assignment2/src/raft/kvstore.go
+1
-0
assignment2/src/server.go
assignment2/src/server.go
+4
-2
No files found.
assignment2/src/raft/kvstore.go
View file @
a05d4e10
...
...
@@ -524,6 +524,7 @@ func InitKVStore() {
}
func
MonitorCommitChannel
(
ch
chan
LogEntry
)
{
//fmt.println("herr")
for
{
//temp := <-ch
}
...
...
assignment2/src/server.go
View file @
a05d4e10
...
...
@@ -34,6 +34,7 @@ func (t *AppendEntries) AppendEntriesRPC(args *Args, reply *Reply) error {
}
func
initInterServerCommunication
(
server
*
raft
.
ServerConfig
,
rft
*
raft
.
Raft
,
ch
chan
bool
)
{
appendRpc
:=
new
(
AppendEntries
)
rpc
.
Register
(
appendRpc
)
listener
,
e
:=
net
.
Listen
(
"tcp"
,
":"
+
strconv
.
Itoa
(
server
.
LogPort
))
...
...
@@ -61,10 +62,11 @@ func initLogger(serverId int) {
Info
=
log
.
New
(
os
.
Stdout
,
"INFO: "
,
log
.
Ldate
|
log
.
Ltime
|
log
.
Lshortfile
)
}
Info
.
Println
(
"Initialized server"
)
Info
.
Println
(
"Initialized server
.
"
)
}
func
initClientCommunication
(
server
*
raft
.
ServerConfig
,
rft
*
raft
.
Raft
,
ch
chan
bool
)
{
listener
,
e
:=
net
.
Listen
(
"tcp"
,
":"
+
strconv
.
Itoa
(
server
.
ClientPort
))
if
e
!=
nil
{
Info
.
Fatal
(
"client listen error:"
,
e
)
...
...
@@ -89,7 +91,7 @@ func main() {
}
initLogger
(
sid
)
Info
.
Println
(
"Start"
)
Info
.
Println
(
"Start
ing
"
)
serverCount
,
err2
:=
strconv
.
Atoi
((
os
.
Args
[
2
]))
if
err2
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment