Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
eu
ADMIRE
scord
Commits
7e9d1bd0
Verified
Commit
7e9d1bd0
authored
2 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
adhoc_storage: Fix bug with shadowed id
Closes
#88
parent
4291f4e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!58
Resolve "adhoc_storage instances should keep track of jobs using them"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/api/admire_types.hpp
+0
-6
0 additions, 6 deletions
src/common/api/admire_types.hpp
src/common/api/types.cpp
+1
-22
1 addition, 22 deletions
src/common/api/types.cpp
src/scord/adhoc_storage_manager.hpp
+1
-2
1 addition, 2 deletions
src/scord/adhoc_storage_manager.hpp
with
2 additions
and
30 deletions
src/common/api/admire_types.hpp
+
0
−
6
View file @
7e9d1bd0
...
...
@@ -348,12 +348,6 @@ struct adhoc_storage : public storage {
operator
=
(
adhoc_storage
&&
)
noexcept
;
~
adhoc_storage
()
override
;
const
std
::
uint64_t
&
id
()
const
;
std
::
uint64_t
&
id
();
std
::
shared_ptr
<
storage
::
ctx
>
context
()
const
final
;
...
...
This diff is collapsed.
Click to expand it.
src/common/api/types.cpp
+
1
−
22
View file @
7e9d1bd0
...
...
@@ -1347,7 +1347,7 @@ adhoc_storage::ctx::should_flush() const {
class
adhoc_storage
::
impl
{
public:
explicit
impl
(
adhoc_storage
::
ctx
ctx
)
:
m_id
(),
m_ctx
(
std
::
move
(
ctx
))
{}
explicit
impl
(
adhoc_storage
::
ctx
ctx
)
:
m_ctx
(
std
::
move
(
ctx
))
{}
impl
(
const
impl
&
rhs
)
=
default
;
impl
(
impl
&&
rhs
)
=
default
;
impl
&
...
...
@@ -1356,16 +1356,6 @@ public:
operator
=
(
impl
&&
)
noexcept
=
default
;
~
impl
()
=
default
;
const
std
::
uint64_t
&
id
()
const
{
return
m_id
;
}
std
::
uint64_t
&
id
()
{
return
m_id
;
}
adhoc_storage
::
ctx
context
()
const
{
return
m_ctx
;
...
...
@@ -1377,7 +1367,6 @@ public:
}
private
:
std
::
uint64_t
m_id
;
adhoc_storage
::
ctx
m_ctx
;
};
...
...
@@ -1417,16 +1406,6 @@ adhoc_storage::operator=(const adhoc_storage& other) noexcept {
adhoc_storage
&
adhoc_storage
::
operator
=
(
adhoc_storage
&&
)
noexcept
=
default
;
const
std
::
uint64_t
&
adhoc_storage
::
id
()
const
{
return
m_pimpl
->
id
();
}
std
::
uint64_t
&
adhoc_storage
::
id
()
{
return
m_pimpl
->
id
();
}
std
::
shared_ptr
<
storage
::
ctx
>
adhoc_storage
::
context
()
const
{
return
std
::
make_shared
<
adhoc_storage
::
ctx
>
(
m_pimpl
->
context
());
...
...
This diff is collapsed.
Click to expand it.
src/scord/adhoc_storage_manager.hpp
+
1
−
2
View file @
7e9d1bd0
...
...
@@ -54,8 +54,7 @@ struct adhoc_storage_manager : scord::utils::singleton<adhoc_storage_manager> {
it
==
m_adhoc_storages
.
end
())
{
const
auto
&
[
it_adhoc
,
inserted
]
=
m_adhoc_storages
.
emplace
(
id
,
std
::
make_shared
<
admire
::
internal
::
adhoc_storage_info
>
(
admire
::
adhoc_storage
{
type
,
name
,
current_id
++
,
ctx
}));
admire
::
adhoc_storage
{
type
,
name
,
id
,
ctx
}));
if
(
!
inserted
)
{
LOGGER_ERROR
(
"{}: Emplace failed"
,
__FUNCTION__
);
...
...
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