Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
eos
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Doina Duma
eos
Commits
057730ee
Commit
057730ee
authored
8 years ago
by
Geoffray Adde
Browse files
Options
Downloads
Patches
Plain Diff
MGM: revert an accidental overwrite in merge
parent
946a35ed
No related branches found
Branches containing commit
Tags
4.0.19
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mgm/Scheduler.cc
+0
-106
0 additions, 106 deletions
mgm/Scheduler.cc
with
0 additions
and
106 deletions
mgm/Scheduler.cc
+
0
−
106
View file @
057730ee
...
...
@@ -210,114 +210,8 @@ Scheduler::FilePlacement(const std::string& spacename,
}
else
{
<<<<<<<
HEAD
eos_static_debug
(
"could not place all replica(s) for %s in subgroup %s, "
"checking next group"
,
path
,
group
->
mName
.
c_str
());
=======
std
::
list
<
eos
::
common
::
FileSystem
::
fsid_t
>::
iterator
ait
;
ait
=
availablevector
.
begin
();
for
(
unsigned
int
loop
=
0
;
loop
<
1000
;
loop
++
)
{
// we cycle over the available filesystems
float
randomacceptor
=
(
0.999999
*
random
()
/
RAND_MAX
);
eos_static_debug
(
"fs %u acceptor %f/%f for %d. replica [loop=%d] [avail=%d]"
,
*
ait
,
randomacceptor
,
availablefs
[
*
ait
],
nassigned
+
1
,
loop
,
availablevector
.
size
());
if
(
nassigned
==
0
)
{
// push it on the selection list
if
(
hasgeolocation
)
{
selected_geo_location
=
availablefsgeolocation
[
*
ait
];
if
((
!
geo_entry_fsid
)
&&
(
vid
.
geolocation
==
availablefsgeolocation
[
*
ait
]))
{
// if this is the first matching
geo_entry_fsid
=
*
ait
;
}
}
eos_static_debug
(
"fs %u selected for %d. replica"
,
*
ait
,
nassigned
+
1
);
if
(
(
nfilesystems
==
1
)
&&
exact_match
&&
!
geo_entry_fsid
)
{
ait
=
availablevector
.
erase
(
ait
);
if
(
ait
==
availablevector
.
end
())
ait
=
availablevector
.
begin
();
}
else
{
selected_filesystems
.
push_back
(
*
ait
);
// remove it from the selection map
availablefs
.
erase
(
*
ait
);
ait
=
availablevector
.
erase
(
ait
);
if
(
ait
==
availablevector
.
end
())
ait
=
availablevector
.
begin
();
// rotate scheduling view ptr
nassigned
++
;
}
}
else
{
// we select a random one
unsigned
int
randomindex
;
randomindex
=
(
unsigned
int
)
((
0.999999
*
random
()
*
availablefs
.
size
())
/
RAND_MAX
);
eos_static_debug
(
"trying random index %d"
,
randomindex
);
for
(
unsigned
int
i
=
0
;
i
<
randomindex
;
i
++
)
{
ait
++
;
if
(
ait
==
availablevector
.
end
())
ait
=
availablevector
.
begin
();
}
float
fsweight
=
availablefs
[
*
ait
];
// only when we need one more geo location, we lower the selection probability
if
((
hasgeolocation
)
&&
(
n_geolocations
!=
1
)
&&
(
selected_geo_location
==
availablefsgeolocation
[
*
ait
]))
{
if
(
exact_match
)
// we dont' schedule not according to geolocation policy
fsweight
=
0.0
;
else
// we reduce the probability to select a filesystem in an already existing location to 1/20th
fsweight
*=
0.05
;
}
if
(
fsweight
>
randomacceptor
)
{
if
(
hasgeolocation
&&
(
!
geo_entry_fsid
)
&&
(
vid
.
geolocation
==
availablefsgeolocation
[
*
ait
]))
{
// if this is the first matching
geo_entry_fsid
=
*
ait
;
}
// push it on the selection list
selected_filesystems
.
push_back
(
*
ait
);
if
(
hasgeolocation
)
{
if
(
selected_geo_location
!=
availablefsgeolocation
[
*
ait
])
{
n_geolocations
++
;
}
}
eos_static_debug
(
"fs %u selected for %d. replica"
,
*
ait
,
nassigned
+
1
);
// remove it from the selection map
availablefs
.
erase
(
*
ait
);
ait
=
availablevector
.
erase
(
ait
);
nassigned
++
;
if
(
ait
==
availablevector
.
end
())
ait
=
availablevector
.
begin
();
}
}
if
(
nassigned
>=
nfilesystems
)
break
;
if
(
ait
==
availablevector
.
end
())
break
;
}
// leave the <loop> where filesystems get selected by weight
>>>>>>>
origin
/
beryl_aquamarine
}
if
(
groupindex
>=
groupsToTry
.
size
())
...
...
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