Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
mos-service-deploy
colabfold2
Commits
c97ce800
Commit
c97ce800
authored
3 years ago
by
Milot Mirdita
Browse files
Options
Download
Patches
Plain Diff
TemplateServer: Fix parallel reads
parent
edc65626
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TemplateServer/dbreader.go
+1
-3
TemplateServer/dbreader.go
with
1 addition
and
3 deletions
+1
-3
TemplateServer/dbreader.go
+
1
−
3
View file @
c97ce800
...
...
@@ -2,7 +2,6 @@ package main
import
(
"bufio"
"io"
"math"
"os"
"sort"
...
...
@@ -90,10 +89,9 @@ func (d *Reader) Data(id int64) string {
if
id
<
0
||
id
>=
d
.
Size
()
{
return
""
}
d
.
file
.
Seek
(
int64
(
d
.
Index
[
id
]
.
Offset
),
io
.
SeekStart
)
length
:=
d
.
Index
[
id
]
.
Length
-
1
buffer
:=
make
([]
byte
,
length
)
d
.
file
.
Read
(
buffer
)
d
.
file
.
Read
At
(
buffer
,
int64
(
d
.
Index
[
id
]
.
Offset
)
)
return
string
(
buffer
[
:
length
])
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets