File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -606,12 +606,19 @@ func (s *Shard) ready() error {
606606}
607607
608608// LastModified returns the time when this shard was last modified.
609+ // On error and 0 TSM files this will return time.Time{} (0001-01-01 00:00:00 +0000 UTC)
609610func (s * Shard ) LastModified () time.Time {
611+ t , _ := s .LastModifiedWithErr ()
612+ return t
613+ }
614+
615+ // LastModifiedOrErr returns the time when this shard was last modified and an error.
616+ func (s * Shard ) LastModifiedWithErr () (time.Time , error ) {
610617 engine , err := s .Engine ()
611618 if err != nil {
612- return time.Time {}
619+ return time.Time {}, err
613620 }
614- return engine .LastModified ()
621+ return engine .LastModified (), nil
615622}
616623
617624// Index returns a reference to the underlying index. It returns an error if
You can’t perform that action at this time.
0 commit comments