From 1187436e468cd16c95e251289c8ac864a866838c Mon Sep 17 00:00:00 2001 From: Marty Schoch Date: Mon, 17 Aug 2015 09:48:40 -0400 Subject: [PATCH] changed Stored row Values to also use protobuf --- index/firestorm/firestorm.md | 9 +++++++-- index/firestorm/firestorm_rows.proto | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 index/firestorm/firestorm_rows.proto diff --git a/index/firestorm/firestorm.md b/index/firestorm/firestorm.md index 2fea642f..e6df132b 100644 --- a/index/firestorm/firestorm.md +++ b/index/firestorm/firestorm.md @@ -114,7 +114,6 @@ The following pseudo-structure will be used to explain changes to the internal s inFlightDocIds = {} deletedDocIdNumbers = {} } - - Garbage Collector Thread is started - Old Doc Number Lookup Thread is started - Index marked open @@ -334,7 +333,13 @@ Stored rows record the original values used to produce the index. At the row en | Key | Value | |---------------------------|-------------------------| -|```'s' 0xff ```|``````| +|```'s' 0xff ```|``````| + + message StoredValue { + bytes raw = 1; // raw bytes + } + +NOTE: we currently encode stored values as raw bytes, however we have other proposals in flight to do something better than this. By using protobuf here as well, we can support existing functionality through the raw field, but allow for more strongly typed information in the future. #### Internal diff --git a/index/firestorm/firestorm_rows.proto b/index/firestorm/firestorm_rows.proto new file mode 100644 index 00000000..d24c7eec --- /dev/null +++ b/index/firestorm/firestorm_rows.proto @@ -0,0 +1,11 @@ +message VersionValue { + required uint64 version = 1; +} + +message FieldValue { + required string name = 1; +} + +message DictionaryValue { + uint64 count = 1; // number of documents using this term in this field +} \ No newline at end of file