Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: src/CoordinatorService.cc

Issue 861001: Create tables for mapping index objects
Patch Set: Created 10 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IndexletManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/CoordinatorService.cc
diff --git a/src/CoordinatorService.cc b/src/CoordinatorService.cc
index a82b0528561bb2fdd7a421d01e339c9fddcdcf66..f5f1d7c5a3be10e4cbfb29e68def48ba2d747f3b 100644
--- a/src/CoordinatorService.cc
+++ b/src/CoordinatorService.cc
@@ -266,7 +266,13 @@ CoordinatorService::createIndex(const WireFormat::CreateIndex::Request* reqHdr,
uint64_t tableId = reqHdr->tableId;
uint8_t indexId = reqHdr->indexId;
uint8_t indexType = reqHdr->indexType;
- tableManager.createIndex(tableId, indexId, indexType);
+
+ string indexTableName;
+ indexTableName.append(format("indexTable:%lu:%d", tableId, indexId));
+ uint64_t indexTableId =
+ tableManager.createTable(indexTableName.c_str(), 1);
+
+ tableManager.createIndex(tableId, indexId, indexType, indexTableId);
}
/**
@@ -280,6 +286,11 @@ CoordinatorService::dropIndex(const WireFormat::DropIndex::Request* reqHdr,
{
uint64_t tableId = reqHdr->tableId;
uint8_t indexId = reqHdr->indexId;
+
+ string indexTableName;
+ indexTableName.append(format("indexTable:%lu:%d", tableId, indexId));
+ tableManager.dropTable(indexTableName.c_str());
+
tableManager.dropIndex(tableId, indexId);
}
« no previous file with comments | « no previous file | src/IndexletManager.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld aab5469