mirror of https://gitee.com/bigwinds/arangodb
removed unused method
This commit is contained in:
parent
ea0f8780cb
commit
91864619dc
|
@ -790,47 +790,6 @@ void LogfileManager::finalize(SlotInfo& slotInfo, bool waitForSync) {
|
|||
_slots->returnUsed(slotInfo, waitForSync);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief write data into the logfile
|
||||
/// this is a convenience function that combines allocate, memcpy and finalize
|
||||
///
|
||||
/// We need this version with cid, sid, legendOffset and oldLegend because
|
||||
/// there is a cache for each WAL file keeping track which legends are
|
||||
/// already in it. The decision whether or not an additional legend is
|
||||
/// needed therefore has to be taken in the allocation routine. This
|
||||
/// version is only used to write document or edge markers. If a previously
|
||||
/// written legend is found its address is returned in oldLegend such that
|
||||
/// the new marker can point to it with a relative reference.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SlotInfoCopy LogfileManager::allocateAndWrite(
|
||||
void* src, uint32_t size, bool waitForSync, TRI_voc_cid_t cid,
|
||||
TRI_shape_sid_t sid, uint32_t legendOffset, void*& oldLegend) {
|
||||
SlotInfo slotInfo = allocate(size, cid, sid, legendOffset, oldLegend);
|
||||
|
||||
if (slotInfo.errorCode != TRI_ERROR_NO_ERROR) {
|
||||
return SlotInfoCopy(slotInfo.errorCode);
|
||||
}
|
||||
|
||||
TRI_ASSERT(slotInfo.slot != nullptr);
|
||||
|
||||
try {
|
||||
slotInfo.slot->fill(src, size);
|
||||
|
||||
// we must copy the slotinfo because finalize() will set its internal to 0
|
||||
// again
|
||||
SlotInfoCopy copy(slotInfo.slot);
|
||||
|
||||
finalize(slotInfo, waitForSync);
|
||||
return copy;
|
||||
} catch (...) {
|
||||
// if we don't return the slot we'll run into serious problems later
|
||||
finalize(slotInfo, false);
|
||||
|
||||
return SlotInfoCopy(TRI_ERROR_INTERNAL);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief write data into the logfile
|
||||
/// this is a convenience function that combines allocate, memcpy and finalize
|
||||
|
|
|
@ -377,16 +377,6 @@ class LogfileManager : public rest::ApplicationFeature {
|
|||
|
||||
SlotInfoCopy allocateAndWrite(void*, uint32_t, bool);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief write data into the logfile
|
||||
/// this is a convenience function that combines allocate, memcpy and
|
||||
/// finalize,
|
||||
/// this version is for markers with legends
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SlotInfoCopy allocateAndWrite(void*, uint32_t, bool, TRI_voc_cid_t,
|
||||
TRI_shape_sid_t, uint32_t, void*&);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief write data into the logfile
|
||||
/// this is a convenience function that combines allocate, memcpy and finalize
|
||||
|
|
Loading…
Reference in New Issue