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 @@ -459,12 +459,19 @@ func (s *Shard) ready() error {
459459}
460460
461461// LastModified returns the time when this shard was last modified.
462+ // On error and 0 TSM files this will return time.Time{} (0001-01-01 00:00:00 +0000 UTC)
462463func (s * Shard ) LastModified () time.Time {
464+ t , _ := s .LastModifiedWithErr ()
465+ return t
466+ }
467+
468+ // LastModifiedOrErr returns the time when this shard was last modified and an error.
469+ func (s * Shard ) LastModifiedWithErr () (time.Time , error ) {
463470 engine , err := s .Engine ()
464471 if err != nil {
465- return time.Time {}
472+ return time.Time {}, err
466473 }
467- return engine .LastModified ()
474+ return engine .LastModified (), nil
468475}
469476
470477// 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