Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Platform
Development
swh-graph
Merge requests
!614
sort: Add more progress logs
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
sort: Add more progress logs
extract-logging
into
master
Overview
1
Commits
1
Pipelines
1
Changes
1
Merged
vlorentz
requested to merge
extract-logging
into
master
6 months ago
Overview
1
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
0da554e3
1 commit,
6 months ago
1 file
+
10
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
rust/src/utils/sort.rs
+
10
−
1
Options
@@ -112,6 +112,9 @@ where
})
.count
();
log
::
info!
(
"Counted {} rows"
,
num_rows
);
log
::
info!
(
"Flushing remaining buffers"
);
let
is_empty
=
num_rows
==
0
;
// Write remaining buffers
@@ -121,6 +124,8 @@ where
flush_buffer
(
state
)
}
log
::
info!
(
"Sorting"
);
// Notify sorters they reached the end of their inputs
for
state
in
thread_states
.iter_mut
()
{
// This is safe because other threads ended
@@ -150,7 +155,7 @@ where
.with_context
(||
format!
(
"Could not create directory {}"
,
target_dir
.display
()))
?
;
if
is_empty
{
// No
persons
; write an empty file so the rest of the pipeline does not
// No
items at all
; write an empty file so the rest of the pipeline does not
// need special-casing for the absence of files.
let
path
=
target_dir
.join
(
"0.csv.zst"
);
let
file
=
std
::
fs
::
File
::
create
(
&
path
)
@@ -168,6 +173,8 @@ where
assert!
(
sorted_files
.len
()
>
0
,
"Sorters did not run"
);
log
::
info!
(
"Merging sorted rows and writing to disk"
);
// Spawn sort * | pv | split
// TODO: it would be nice to start merging without waiting for all sorters
@@ -211,6 +218,8 @@ where
merge
.wait
()
.with_context
(||
"pv crashed"
)
?
;
split
.wait
()
.with_context
(||
"split/zstdmt crashed"
)
?
;
log
::
info!
(
"Done sorting rows and writing to disk"
);
Ok
(())
}
}
Loading