Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
adilr3
RAMCloud
Commits
01798a5c
Commit
01798a5c
authored
Nov 29, 2021
by
adilr3
Browse files
more persistency stuff
parent
9e5607a2
Changes
5
Hide whitespace changes
Inline
Side-by-side
.vscode/settings.json
View file @
01798a5c
...
...
@@ -16,6 +16,13 @@
"slist"
:
"cpp"
,
"ostream"
:
"cpp"
,
"fstream"
:
"cpp"
,
"istream"
:
"cpp"
"istream"
:
"cpp"
,
"array"
:
"cpp"
,
"chrono"
:
"cpp"
,
"functional"
:
"cpp"
,
"ratio"
:
"cpp"
,
"tuple"
:
"cpp"
,
"type_traits"
:
"cpp"
,
"utility"
:
"cpp"
}
}
\ No newline at end of file
src/HashTable.cc
View file @
01798a5c
...
...
@@ -148,6 +148,8 @@ HashTable::Entry::pack(uint64_t hash, bool chain, uint64_t ptr)
uint64_t
c
=
chain
?
1
:
0
;
assert
((
hash
>>
16
)
==
0
);
this
->
value
=
((
hash
<<
48
)
|
(
c
<<
47
)
|
ptr
);
flush
(
&
(
this
->
value
),
sizeof
(
uint64_t
));
// need flush for persistency
}
/**
...
...
src/ObjectManager.cc
View file @
01798a5c
...
...
@@ -470,21 +470,26 @@ ObjectManager::removeObject(Key& key, RejectRules* rejectRules,
appends
[
1
].
type
=
LOG_ENTRY_TYPE_RPCRESULT
;
}
// flush added to append
if
(
!
log
.
append
(
appends
,
(
rpcResult
?
2
:
1
)))
{
// The log is out of space. Tell the client to retry and hope
// that the cleaner makes space soon.
return
STATUS_RETRY
;
}
if
(
rpcResult
&&
rpcResultPtr
)
if
(
rpcResult
&&
rpcResultPtr
)
{
*
rpcResultPtr
=
appends
[
1
].
reference
.
toInteger
();
flush
(
rpcResultPtr
,
sizeof
(
rpcResultPtr
));
}
mfence
();
TableStats
::
increment
(
masterTableMetadata
,
tablet
.
tableId
,
appends
[
0
].
buffer
.
size
()
+
appends
[
1
].
buffer
.
size
(),
rpcResult
?
2
:
1
);
segmentManager
.
raiseSafeVersion
(
object
.
getVersion
()
+
1
);
log
.
free
(
reference
);
log
.
free
(
reference
);
//TODO: does this need a flush? if so, where
remove
(
lock
,
key
);
return
STATUS_OK
;
}
...
...
@@ -2173,6 +2178,7 @@ ObjectManager::flushEntriesToLog(Buffer *logBuffer, uint32_t& numEntries)
// persistency added
objectMap
.
insert
(
key
.
getHash
(),
references
[
i
].
toInteger
());
}
mfence
();
tabletManager
->
incrementWriteCount
(
key
);
TableStats
::
increment
(
masterTableMetadata
,
...
...
src/Segment.cc
View file @
01798a5c
...
...
@@ -1002,11 +1002,11 @@ Segment::Reference::getEntry(SegletAllocator* allocator,
}
if
(
lengthWithMetadata
!=
NULL
){
*
lengthWithMetadata
=
fullLength
;
// TODO: check whether needed
flush
(
reinterpret_cast
<
void
*>
(
reference
),
fullLength
);
mfence
();
}
return
header
->
getType
();
}
...
...
src/btreeRamCloud/Btree.h
View file @
01798a5c
...
...
@@ -35,6 +35,8 @@
#include
"ObjectManager.h"
#include
"PerfStats.h"
#include
"Common.h"
namespace
RAMCloud
{
// Nodes in the B+ tree are stored as RAMCloud objects with the key being a
...
...
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!
Cancel
Please
register
or
sign in
to comment