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
d853a44a
Commit
d853a44a
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Debug
parent
8ddb19ef
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
+3
-5
3 additions, 5 deletions
fileTransfer/manager.go
stoppable/multi.go
+3
-3
3 additions, 3 deletions
stoppable/multi.go
with
6 additions
and
8 deletions
fileTransfer/manager.go
+
3
−
5
View file @
d853a44a
...
...
@@ -215,7 +215,7 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) {
// StartProcesses starts the sending threads. Adheres to the xxdk.Service type.
func
(
m
*
manager
)
StartProcesses
()
(
stoppable
.
Stoppable
,
error
)
{
// Construct stoppables
send
Stoppable
:=
stoppable
.
NewMulti
(
workerPool
Stoppable
)
multi
Stoppable
:=
stoppable
.
NewMulti
(
fileTransfer
Stoppable
)
batchBuilderStop
:=
stoppable
.
NewSingle
(
batchBuilderThreadStoppable
)
// Start sending threads
...
...
@@ -226,14 +226,12 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
// running this asynchronously could result in a race condition where
// some worker threads are not added to senderPoolStop before that stoppable
// is added to the multiStoppable.
m
.
startSendingWorkerPool
(
send
Stoppable
)
m
.
startSendingWorkerPool
(
multi
Stoppable
)
jww
.
INFO
.
Printf
(
"STOPPING FT THREAD DEBUG:
\n
multiStoppable running proc: %v
\n
multistop: %v
\n
"
,
send
Stoppable
,
send
Stoppable
.
GetRunningProcesses
())
multi
Stoppable
,
multi
Stoppable
.
GetRunningProcesses
())
// Create a multi stoppable
multiStoppable
:=
stoppable
.
NewMulti
(
fileTransferStoppable
)
multiStoppable
.
Add
(
batchBuilderStop
)
multiStoppable
.
Add
(
sendStoppable
)
jww
.
INFO
.
Printf
(
"STOPPING FT THREAD DEBUG:
\n
multiStoppable running proc: %v
\n
multistop: %v
\n
"
,
multiStoppable
.
GetRunningProcesses
(),
multiStoppable
)
...
...
This diff is collapsed.
Click to expand it.
stoppable/multi.go
+
3
−
3
View file @
d853a44a
...
...
@@ -128,9 +128,9 @@ func (m *Multi) Close() error {
// Attempt to stop each stoppable in its own goroutine
for
_
,
stoppable
:=
range
m
.
stoppables
{
wg
.
Add
(
1
)
jww
.
INFO
.
Printf
(
"FT DEBUG: stopping %s"
,
stoppable
.
Name
())
go
func
(
stoppable
Stoppable
)
{
if
s
toppable
.
Close
()
!=
nil
{
go
func
(
s
Stoppable
)
{
jww
.
INFO
.
Printf
(
"FT DEBUG: stopping %s"
,
s
.
Name
())
if
s
.
Close
()
!=
nil
{
atomic
.
AddUint32
(
&
numErrors
,
1
)
}
wg
.
Done
()
...
...
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