Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Container registry
Harbor 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
dCache
cta
Commits
6cac3e41
Commit
6cac3e41
authored
7 years ago
by
Victor Kotlyar
Browse files
Options
Downloads
Patches
Plain Diff
Work in progress: add async fetch with no lock for GC.
Make compilation and unit tests pass for checking.
parent
d8685e4e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
objectstore/GenericObject.hpp
+10
-3
10 additions, 3 deletions
objectstore/GenericObject.hpp
objectstore/ObjectOps.hpp
+6
-0
6 additions, 0 deletions
objectstore/ObjectOps.hpp
with
16 additions
and
3 deletions
objectstore/GenericObject.hpp
+
10
−
3
View file @
6cac3e41
...
...
@@ -24,6 +24,7 @@
namespace
cta
{
namespace
objectstore
{
class
GenericObject
:
public
ObjectOps
<
serializers
::
GenericObject
,
serializers
::
GenericObject_t
>
{
std
::
unique_ptr
<
Backend
::
AsyncLockfreeFetcher
>
m_asyncLockfreeFetcher
;
public:
GenericObject
(
const
std
::
string
&
name
,
Backend
&
os
)
:
ObjectOps
<
serializers
::
GenericObject
,
serializers
::
GenericObject_t
>
(
os
,
name
)
{};
...
...
@@ -33,11 +34,16 @@ public:
/** Overload of ObjectOps's implementation: this special object tolerates all
* types of objects */
void
fetch
();
/**
* Asynchronously fetch object without lock.
*/
void
asyncLockfreeFetch
();
/**
* Performs async fetch, wait, get
* TODO - temporary implementation to test the asyncLockfreeFetch
* wait for async object fetch and get the result.
*/
void
l
ockfreeFetch
();
void
waitAndGetAsyncL
ockfreeFetch
();
/** Overload of ObjectOps's implementation: we will leave the payload transparently
* untouched and only deal with header parameters */
...
...
@@ -45,6 +51,7 @@ public:
/** Get the object's type (type is forced implicitly in other classes) */
serializers
::
ObjectType
type
();
serializers
::
ObjectType
getTypeWithNoLock
();
/** Overload of ObjectOps's implementation: this operation is forbidden. Generic
* Object is only used to manipulate existing objects */
...
...
This diff is collapsed.
Click to expand it.
objectstore/ObjectOps.hpp
+
6
−
0
View file @
6cac3e41
...
...
@@ -141,6 +141,12 @@ public:
return
m_header
.
owner
();
}
std
::
string
getOwnerWithNoLock
()
{
if
(
!
m_headerInterpreted
)
throw
NotFetched
(
"In ObjectOps::checkHeaderReadable: header not yet fetched or initialized"
);
return
m_header
.
owner
();
}
void
setBackupOwner
(
const
std
::
string
&
owner
)
{
checkHeaderWritable
();
m_header
.
set_backupowner
(
owner
);
...
...
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