good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
3f923f39
Unverified
Commit
3f923f39
authored
Feb 20, 2017
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
swarm: remove superfluous line break in log statements
parent
189dee26
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
swarm/api/http/server.go
+4
-8
4 additions, 8 deletions
swarm/api/http/server.go
swarm/network/depo.go
+1
-1
1 addition, 1 deletion
swarm/network/depo.go
with
5 additions
and
9 deletions
swarm/api/http/server.go
+
4
−
8
View file @
3f923f39
...
@@ -293,13 +293,11 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
...
@@ -293,13 +293,11 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
self
.
lock
.
Lock
()
self
.
lock
.
Lock
()
// assert self.pos <= off
// assert self.pos <= off
if
self
.
pos
>
off
{
if
self
.
pos
>
off
{
glog
.
V
(
logger
.
Error
)
.
Infof
(
"non-sequential read attempted from sequentialReader; %d > %d"
,
glog
.
V
(
logger
.
Error
)
.
Infof
(
"non-sequential read attempted from sequentialReader; %d > %d"
,
self
.
pos
,
off
)
self
.
pos
,
off
)
panic
(
"Non-sequential read attempt"
)
panic
(
"Non-sequential read attempt"
)
}
}
if
self
.
pos
!=
off
{
if
self
.
pos
!=
off
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"deferred read in POST at position %d, offset %d."
,
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"deferred read in POST at position %d, offset %d."
,
self
.
pos
,
off
)
self
.
pos
,
off
)
wait
:=
make
(
chan
bool
)
wait
:=
make
(
chan
bool
)
self
.
ahead
[
off
]
=
wait
self
.
ahead
[
off
]
=
wait
self
.
lock
.
Unlock
()
self
.
lock
.
Unlock
()
...
@@ -315,8 +313,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
...
@@ -315,8 +313,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
for
localPos
<
len
(
target
)
{
for
localPos
<
len
(
target
)
{
n
,
err
=
self
.
reader
.
Read
(
target
[
localPos
:
])
n
,
err
=
self
.
reader
.
Read
(
target
[
localPos
:
])
localPos
+=
n
localPos
+=
n
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"Read %d bytes into buffer size %d from POST, error %v."
,
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"Read %d bytes into buffer size %d from POST, error %v."
,
n
,
len
(
target
),
err
)
n
,
len
(
target
),
err
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"POST stream's reading terminated with %v."
,
err
)
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"POST stream's reading terminated with %v."
,
err
)
for
i
:=
range
self
.
ahead
{
for
i
:=
range
self
.
ahead
{
...
@@ -330,8 +327,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
...
@@ -330,8 +327,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
}
}
wait
:=
self
.
ahead
[
self
.
pos
]
wait
:=
self
.
ahead
[
self
.
pos
]
if
wait
!=
nil
{
if
wait
!=
nil
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"deferred read in POST at position %d triggered."
,
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"deferred read in POST at position %d triggered."
,
self
.
pos
)
self
.
pos
)
delete
(
self
.
ahead
,
self
.
pos
)
delete
(
self
.
ahead
,
self
.
pos
)
close
(
wait
)
close
(
wait
)
}
}
...
...
This diff is collapsed.
Click to expand it.
swarm/network/depo.go
+
1
−
1
View file @
3f923f39
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