Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013 University of California, Los Angeles |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation; |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * Zhenkai Zhu <zhenkai@cs.ucla.edu> |
| 19 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 20 | */ |
| 21 | |
| 22 | #include "dispatcher.h" |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 23 | #include "logging.h" |
| 24 | |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 25 | #include <boost/make_shared.hpp> |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 26 | #include <boost/lexical_cast.hpp> |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 27 | |
| 28 | using namespace Ccnx; |
| 29 | using namespace std; |
| 30 | using namespace boost; |
| 31 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 32 | INIT_LOGGER ("Dispatcher"); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 33 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 34 | static const string BROADCAST_DOMAIN = "/ndn/broadcast/chronoshare"; |
| 35 | |
| 36 | Dispatcher::Dispatcher(const filesystem::path &path, const std::string &localUserName, |
| 37 | const Ccnx::Name &localPrefix, const std::string &sharedFolder, |
| 38 | const filesystem::path &rootDir, Ccnx::CcnxWrapperPtr ccnx, |
| 39 | SchedulerPtr scheduler, int poolSize) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 40 | : m_ccnx(ccnx) |
| 41 | , m_core(NULL) |
| 42 | , m_rootDir(rootDir) |
| 43 | , m_executor(poolSize) |
| 44 | , m_objectManager(ccnx, rootDir) |
| 45 | , m_localUserName(localUserName) |
| 46 | , m_sharedFolder(sharedFolder) |
Zhenkai Zhu | 1dcbbab | 2013-01-22 16:03:20 -0800 | [diff] [blame] | 47 | , m_server(NULL) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 48 | { |
Alexander Afanasyev | cbda992 | 2013-01-22 11:21:12 -0800 | [diff] [blame] | 49 | m_syncLog = make_shared<SyncLog>(path, localUserName); |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 50 | m_actionLog = make_shared<ActionLog>(m_ccnx, path, m_syncLog, sharedFolder, |
| 51 | // bind (&Dispatcher::Did_ActionLog_ActionApply_AddOrModify, this, _1, _2, _3, _4, _5, _6, _7), |
| 52 | ActionLog::OnFileAddedOrChangedCallback (), // don't really need this callback |
| 53 | bind (&Dispatcher::Did_ActionLog_ActionApply_Delete, this, _1)); |
Alexander Afanasyev | 1b15cc6 | 2013-01-22 17:00:40 -0800 | [diff] [blame] | 54 | Name syncPrefix = Name(BROADCAST_DOMAIN)(sharedFolder); |
Alexander Afanasyev | cbda992 | 2013-01-22 11:21:12 -0800 | [diff] [blame] | 55 | |
Zhenkai Zhu | 1dcbbab | 2013-01-22 16:03:20 -0800 | [diff] [blame] | 56 | m_server = new ContentServer(m_ccnx, m_actionLog, rootDir); |
| 57 | m_server->registerPrefix(localPrefix); |
| 58 | m_server->registerPrefix(syncPrefix); |
| 59 | |
Alexander Afanasyev | cbda992 | 2013-01-22 11:21:12 -0800 | [diff] [blame] | 60 | m_core = new SyncCore (m_syncLog, localUserName, localPrefix, syncPrefix, |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 61 | bind(&Dispatcher::Did_SyncLog_StateChange, this, _1), ccnx, scheduler); |
Zhenkai Zhu | 1dcbbab | 2013-01-22 16:03:20 -0800 | [diff] [blame] | 62 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 63 | m_actionFetcher = make_shared<FetchManager> (m_ccnx, bind (&SyncLog::LookupLocator, &*m_syncLog, _1), 3); |
| 64 | m_fileFetcher = make_shared<FetchManager> (m_ccnx, bind (&SyncLog::LookupLocator, &*m_syncLog, _1), 3); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | Dispatcher::~Dispatcher() |
| 68 | { |
| 69 | if (m_core != NULL) |
| 70 | { |
| 71 | delete m_core; |
| 72 | m_core = NULL; |
| 73 | } |
Zhenkai Zhu | 1dcbbab | 2013-01-22 16:03:20 -0800 | [diff] [blame] | 74 | |
| 75 | if (m_server != NULL) |
| 76 | { |
| 77 | delete m_server; |
| 78 | m_server = NULL; |
| 79 | } |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 80 | } |
| 81 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 82 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 83 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 84 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 85 | |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 86 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 87 | Dispatcher::Did_LocalFile_AddOrModify (const filesystem::path &relativeFilePath) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 88 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 89 | m_executor.execute (bind (&Dispatcher::Did_LocalFile_AddOrModify_Execute, this, relativeFilePath)); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 93 | Dispatcher::Did_LocalFile_AddOrModify_Execute (filesystem::path relativeFilePath) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 94 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 95 | filesystem::path absolutePath = m_rootDir / relativeFilePath; |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 96 | if (!filesystem::exists(absolutePath)) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 97 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 98 | BOOST_THROW_EXCEPTION (Error::Dispatcher() << error_info_str("Update non exist file: " + absolutePath.string() )); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 99 | } |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 100 | |
| 101 | FileItemPtr currentFile = m_actionLog->LookupFile (relativeFilePath.generic_string ()); |
| 102 | if (currentFile && |
| 103 | *Hash::FromFileContent (absolutePath) == Hash (currentFile->file_hash ().c_str (), currentFile->file_hash ().size ()) && |
| 104 | last_write_time (absolutePath) == currentFile->mtime () && |
| 105 | status (absolutePath).permissions () == static_cast<filesystem::perms> (currentFile->mode ())) |
| 106 | { |
| 107 | _LOG_ERROR ("Got notification about the same file [" << relativeFilePath << "]"); |
| 108 | return; |
| 109 | } |
| 110 | |
| 111 | int seg_num; |
| 112 | HashPtr hash; |
| 113 | tie (hash, seg_num) = m_objectManager.localFileToObjects (absolutePath, m_localUserName); |
| 114 | |
| 115 | m_actionLog->AddLocalActionUpdate (relativeFilePath.generic_string(), |
| 116 | *hash, |
| 117 | last_write_time (absolutePath), status (absolutePath).permissions (), seg_num); |
| 118 | |
| 119 | // notify SyncCore to propagate the change |
| 120 | m_core->localStateChanged(); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 124 | Dispatcher::Did_LocalFile_Delete (const filesystem::path &relativeFilePath) |
| 125 | { |
| 126 | m_executor.execute (bind (&Dispatcher::Did_LocalFile_Delete_Execute, this, relativeFilePath)); |
| 127 | } |
| 128 | |
| 129 | void |
| 130 | Dispatcher::Did_LocalFile_Delete_Execute (filesystem::path relativeFilePath) |
| 131 | { |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 132 | filesystem::path absolutePath = m_rootDir / relativeFilePath; |
| 133 | if (!filesystem::exists(absolutePath)) |
| 134 | { |
| 135 | BOOST_THROW_EXCEPTION (Error::Dispatcher() << error_info_str("Delete notification but file exists: " + absolutePath.string() )); |
| 136 | } |
| 137 | |
| 138 | FileItemPtr currentFile = m_actionLog->LookupFile (relativeFilePath.generic_string ()); |
| 139 | if (!currentFile) |
| 140 | { |
| 141 | _LOG_ERROR ("File already deleted [" << relativeFilePath << "]"); |
| 142 | return; |
| 143 | } |
| 144 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 145 | m_actionLog->AddLocalActionDelete (relativeFilePath.generic_string()); |
| 146 | // notify SyncCore to propagate the change |
| 147 | m_core->localStateChanged(); |
| 148 | } |
| 149 | |
| 150 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 151 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 152 | ///////////////////////////////////////////////////////////////////////////////////////////////////// |
| 153 | |
| 154 | /** |
| 155 | * Callbacks: |
| 156 | * |
| 157 | * - from SyncLog: when state changes -> to fetch missing actions |
| 158 | * |
| 159 | * - from FetchManager/Actions: when action is fetched -> to request a file, specified by the action |
| 160 | * -> to add action to the action log |
| 161 | * |
| 162 | * - from ActionLog/Delete: when action applied (file state changed, file deleted) -> to delete local file |
| 163 | * |
| 164 | * - from ActionLog/AddOrUpdate: when action applied (file state changes, file added or modified) -> do nothing? |
| 165 | * |
| 166 | * - from FetchManager/Files: when file segment is retrieved -> save it in ObjectDb |
| 167 | * when file fetch is completed -> if file belongs to FileState, then assemble it to filesystem. Don't do anything otherwise |
| 168 | */ |
| 169 | |
| 170 | void |
| 171 | Dispatcher::Did_SyncLog_StateChange (const SyncStateMsgPtr &stateMsg) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 172 | { |
| 173 | int size = stateMsg->state_size(); |
| 174 | int index = 0; |
| 175 | // iterate and fetch the actions |
| 176 | while (index < size) |
| 177 | { |
| 178 | SyncState state = stateMsg->state(index); |
| 179 | if (state.has_old_seq() && state.has_seq()) |
| 180 | { |
| 181 | uint64_t oldSeq = state.old_seq(); |
| 182 | uint64_t newSeq = state.seq(); |
| 183 | Name userName = state.name(); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 184 | |
| 185 | // fetch actions with oldSeq + 1 to newSeq (inclusive) |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 186 | Name actionNameBase = Name(userName)("action")(m_sharedFolder); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 187 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 188 | m_actionFetcher->Enqueue (userName, actionNameBase, |
| 189 | bind (&Dispatcher::Did_FetchManager_ActionFetch, this, _1, _2, _3, _4), FetchManager::FinishCallback (), |
| 190 | oldSeq + 1, newSeq, FetchManager::PRIORITY_HIGH); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 196 | Dispatcher::Did_FetchManager_ActionFetch (const Ccnx::Name &deviceName, const Ccnx::Name &actionName, uint32_t seqno, Ccnx::PcoPtr actionPco) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 197 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 198 | /// @todo Errors and exception checking |
| 199 | _LOG_DEBUG ("Received action deviceName: " << deviceName << ", actionName: " << actionName << ", seqno: " << seqno); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 200 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 201 | ActionItemPtr action = m_actionLog->AddRemoteAction (deviceName, seqno, actionPco); |
| 202 | // trigger may invoke Did_ActionLog_ActionApply_Delete or Did_ActionLog_ActionApply_AddOrModify callbacks |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 203 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 204 | if (action->action () == ActionItem::UPDATE) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 205 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 206 | Hash hash (action->file_hash ().c_str(), action->file_hash ().size ()); |
| 207 | |
| 208 | Name fileNameBase = Name (deviceName)("file")(hash.GetHash (), hash.GetHashBytes ()); |
| 209 | |
| 210 | if (m_objectDbMap.find (hash) == m_objectDbMap.end ()) |
| 211 | { |
| 212 | m_objectDbMap [hash] = make_shared<ObjectDb> (m_rootDir, lexical_cast<string> (hash)); |
| 213 | } |
| 214 | |
| 215 | m_fileFetcher->Enqueue (deviceName, fileNameBase, |
| 216 | bind (&Dispatcher::Did_FetchManager_FileSegmentFetch, this, _1, _2, _3, _4), |
| 217 | bind (&Dispatcher::Did_FetchManager_FileFetchComplete, this, _1, _2), |
| 218 | 0, action->seg_num (), FetchManager::PRIORITY_NORMAL); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 219 | } |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 223 | Dispatcher::Did_ActionLog_ActionApply_Delete (const std::string &filename) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 224 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 225 | m_executor.execute (bind (&Dispatcher::Did_ActionLog_ActionApply_Delete_Execute, this, filename)); |
| 226 | } |
| 227 | |
| 228 | void |
| 229 | Dispatcher::Did_ActionLog_ActionApply_Delete_Execute (std::string filename) |
| 230 | { |
| 231 | _LOG_DEBUG ("Action to delete " << filename); |
| 232 | |
| 233 | filesystem::path absolutePath = m_rootDir / filename; |
| 234 | if (filesystem::exists(absolutePath)) |
| 235 | { |
| 236 | // need some protection from local detection of removal |
| 237 | remove (absolutePath); |
| 238 | } |
| 239 | // don't exist |
| 240 | } |
| 241 | |
| 242 | void |
| 243 | Dispatcher::Did_FetchManager_FileSegmentFetch (const Ccnx::Name &deviceName, const Ccnx::Name &fileSegmentName, uint32_t segment, Ccnx::PcoPtr fileSegmentPco) |
| 244 | { |
| 245 | m_executor.execute (bind (&Dispatcher::Did_FetchManager_FileSegmentFetch_Execute, this, deviceName, fileSegmentName, segment, fileSegmentPco)); |
| 246 | } |
| 247 | |
| 248 | void |
| 249 | Dispatcher::Did_FetchManager_FileSegmentFetch_Execute (Ccnx::Name deviceName, Ccnx::Name fileSegmentName, uint32_t segment, Ccnx::PcoPtr fileSegmentPco) |
| 250 | { |
| 251 | const Bytes &hashBytes = fileSegmentName.getCompFromBack (1); |
| 252 | Hash hash (head(hashBytes), hashBytes.size()); |
| 253 | |
| 254 | _LOG_DEBUG ("Received segment deviceName: " << deviceName << ", segmentName: " << fileSegmentName << ", segment: " << segment); |
| 255 | |
| 256 | map<Hash, ObjectDbPtr>::iterator db = m_objectDbMap.find (hash); |
| 257 | if (db != m_objectDbMap.end()) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 258 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 259 | db->second->saveContentObject(deviceName, segment, fileSegmentPco->buf ()); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 260 | } |
| 261 | else |
| 262 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 263 | _LOG_ERROR ("no db available for this content object: " << fileSegmentName << ", size: " << fileSegmentPco->buf ().size()); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 264 | } |
| 265 | } |
| 266 | |
| 267 | void |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 268 | Dispatcher::Did_FetchManager_FileFetchComplete (const Ccnx::Name &deviceName, const Ccnx::Name &fileBaseName) |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 269 | { |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 270 | m_executor.execute (bind (&Dispatcher::Did_FetchManager_FileFetchComplete_Execute, this, deviceName, fileBaseName)); |
| 271 | } |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 272 | |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 273 | void |
| 274 | Dispatcher::Did_FetchManager_FileFetchComplete_Execute (Ccnx::Name deviceName, Ccnx::Name fileBaseName) |
| 275 | { |
| 276 | _LOG_DEBUG ("Finished fetching " << deviceName << ", fileBaseName: " << fileBaseName); |
Alexander Afanasyev | f9978f8 | 2013-01-23 16:30:31 -0800 | [diff] [blame] | 277 | |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 278 | const Bytes &hashBytes = fileBaseName.getCompFromBack (1); |
| 279 | Hash hash (head (hashBytes), hashBytes.size ()); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 280 | |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 281 | FileItemsPtr filesToAssemble = m_actionLog->LookupFilesForHash (hash); |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 282 | |
Alexander Afanasyev | f2c16e0 | 2013-01-23 18:08:04 -0800 | [diff] [blame^] | 283 | for (FileItems::iterator file = filesToAssemble->begin (); |
| 284 | file != filesToAssemble->end (); |
| 285 | file++) |
| 286 | { |
| 287 | boost::filesystem::path filePath = m_rootDir / file->filename (); |
| 288 | m_objectManager.objectsToLocalFile (deviceName, hash, filePath); |
| 289 | |
| 290 | last_write_time (filePath, file->mtime ()); |
| 291 | permissions (filePath, static_cast<filesystem::perms> (file->mode ())); |
| 292 | } |
| 293 | |
| 294 | if (m_objectDbMap.find (hash) != m_objectDbMap.end()) |
| 295 | { |
| 296 | // remove the db handle |
| 297 | m_objectDbMap.erase (hash); |
| 298 | } |
| 299 | else |
| 300 | { |
| 301 | _LOG_ERROR ("no db available for this file: " << hash); |
| 302 | } |
Zhenkai Zhu | c3fd51e | 2013-01-22 10:45:54 -0800 | [diff] [blame] | 303 | } |