Merge pull request #35 from wwwjfy/fix-checkpoint

fix periodic checkpoint not triggered
This commit is contained in:
Xavi 2018-12-11 16:23:51 -08:00 committed by GitHub
commit 7351346041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ func (srp *sampleRecordProcessor) Initialize(shardID string, checkpointer kcl.Ch
}
func (srp *sampleRecordProcessor) shouldUpdateSequence(pair kcl.SequencePair) bool {
return srp.largestPair.IsLessThan(pair)
return srp.largestPair.IsNil() || srp.largestPair.IsLessThan(pair)
}
func (srp *sampleRecordProcessor) ProcessRecords(records []kcl.Record) error {