Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: logdog/common/archive/index.go

Issue 2422393002: Fix sparse index handling, add index params. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: logdog/common/archive/index.go
diff --git a/logdog/common/archive/index.go b/logdog/common/archive/index.go
index dd3324e8261f72a05adba74382aa416af72c0f03..3e9ad22891cf3946d2e82d65642db77024fc5df4 100644
--- a/logdog/common/archive/index.go
+++ b/logdog/common/archive/index.go
@@ -29,6 +29,11 @@ func (i *indexBuilder) addLogEntry(le *logpb.LogEntry, offset int64) {
i.lastBytes += uint64(i.size(le))
}
+ // Update our stream properties.
dnj 2016/10/17 22:12:12 (Generate the new protobuf parameters)
+ i.index.LastPrefixIndex = le.PrefixIndex
+ i.index.LastStreamIndex = le.StreamIndex
+ i.index.LogEntryCount++
+
// Do we index this LogEntry?
if len(i.index.Entries) > 0 {
if !((i.StreamIndexRange > 0 && (le.StreamIndex-i.lastStreamIndex) >= uint64(i.StreamIndexRange)) ||

Powered by Google App Engine
This is Rietveld 408576698