Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
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
elixxir
client
Commits
0cc66ec0
Commit
0cc66ec0
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Try some more debugs
parent
6e88a678
No related branches found
No related tags found
2 merge requests
!510
Release
,
!398
Add debug log for file transfer not quitting
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fileTransfer/manager.go
+8
-3
8 additions, 3 deletions
fileTransfer/manager.go
stoppable/single.go
+1
-1
1 addition, 1 deletion
stoppable/single.go
with
9 additions
and
4 deletions
fileTransfer/manager.go
+
8
−
3
View file @
0cc66ec0
...
@@ -215,20 +215,25 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) {
...
@@ -215,20 +215,25 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) {
// StartProcesses starts the sending threads. Adheres to the xxdk.Service type.
// StartProcesses starts the sending threads. Adheres to the xxdk.Service type.
func
(
m
*
manager
)
StartProcesses
()
(
stoppable
.
Stoppable
,
error
)
{
func
(
m
*
manager
)
StartProcesses
()
(
stoppable
.
Stoppable
,
error
)
{
// Construct stoppables
// Construct stoppables
multi
Stoppable
:=
stoppable
.
NewMulti
(
fileTransfer
Stoppable
)
send
Stoppable
:=
stoppable
.
NewMulti
(
sendThread
Stoppable
Name
)
batchBuilderStop
:=
stoppable
.
NewSingle
(
batchBuilderThreadStoppable
)
batchBuilderStop
:=
stoppable
.
NewSingle
(
batchBuilderThreadStoppable
)
// Start sending threads
// Start sending threads
go
m
.
batchBuilderThread
(
batchBuilderStop
)
// Note that the startSendingWorkerPool already creates thread for every
// Note that the startSendingWorkerPool already creates thread for every
// worker. As a result, there is no need to run it asynchronously. In fact,
// worker. As a result, there is no need to run it asynchronously. In fact,
// running this asynchronously could result in a race condition where
// running this asynchronously could result in a race condition where
// some worker threads are not added to senderPoolStop before that stoppable
// some worker threads are not added to senderPoolStop before that stoppable
// is added to the multiStoppable.
// is added to the multiStoppable.
m
.
startSendingWorkerPool
(
multiStoppable
)
m
.
startSendingWorkerPool
(
sendStoppable
)
go
m
.
batchBuilderThread
(
batchBuilderStop
)
jww
.
INFO
.
Printf
(
"STOPPING FT THREAD DEBUG:
\n
multiStoppable running proc: %v
\n
multistop: %v
\n
"
,
sendStoppable
,
sendStoppable
.
GetRunningProcesses
())
// Create a multi stoppable
// Create a multi stoppable
multiStoppable
:=
stoppable
.
NewMulti
(
fileTransferStoppable
)
multiStoppable
.
Add
(
batchBuilderStop
)
multiStoppable
.
Add
(
batchBuilderStop
)
multiStoppable
.
Add
(
sendStoppable
)
jww
.
INFO
.
Printf
(
"STOPPING FT THREAD DEBUG:
\n
multiStoppable running proc: %v
\n
multistop: %v
\n
"
,
jww
.
INFO
.
Printf
(
"STOPPING FT THREAD DEBUG:
\n
multiStoppable running proc: %v
\n
multistop: %v
\n
"
,
multiStoppable
.
GetRunningProcesses
(),
multiStoppable
)
multiStoppable
.
GetRunningProcesses
(),
multiStoppable
)
...
...
This diff is collapsed.
Click to expand it.
stoppable/single.go
+
1
−
1
View file @
0cc66ec0
...
@@ -105,7 +105,7 @@ func (s *Single) Close() error {
...
@@ -105,7 +105,7 @@ func (s *Single) Close() error {
return
return
}
}
jww
.
TRACE
.
Printf
(
"Sending on quit channel to single stoppable %q."
,
jww
.
INFO
.
Printf
(
"Sending on quit channel to single stoppable %q."
,
s
.
Name
())
s
.
Name
())
// Send on quit channel
// Send on quit channel
...
...
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