You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2022/03/01 05:06:55 UTC

[skywalking-banyandb] branch tsdb-local-time created (now 809f2d9)

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a change to branch tsdb-local-time
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git.


      at 809f2d9  Add the location to the start time parser

This branch includes the following new commits:

     new 809f2d9  Add the location to the start time parser

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking-banyandb] 01/01: Add the location to the start time parser

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch tsdb-local-time
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit 809f2d90b6261fb673353c84315945dbb4930d00
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Mar 1 12:53:18 2022 +0800

    Add the location to the start time parser
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 banyand/tsdb/segment.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/banyand/tsdb/segment.go b/banyand/tsdb/segment.go
index a848aeb..2db1f91 100644
--- a/banyand/tsdb/segment.go
+++ b/banyand/tsdb/segment.go
@@ -245,7 +245,10 @@ func (bc *blockController) ensureBlockOpen(blocks []*block) (openedBlocks []*blo
 			}
 		}
 		openedBlocks = append(openedBlocks, b)
-		bc.blockQueue.Push(b.blockID)
+		bc.blockQueue.Push(BlockID{
+			BlockID: b.blockID,
+			SegID:   b.segID,
+		})
 	}
 	return openedBlocks
 }
@@ -274,7 +277,7 @@ func (bc *blockController) startTime(suffix string) (time.Time, error) {
 		return time.Date(startTime.Year(), startTime.Month(),
 			t.Day(), t.Hour(), 0, 0, 0, startTime.Location()), nil
 	case MILLISECOND:
-		return time.Parse(millisecondFormat, suffix)
+		return time.ParseInLocation(millisecondFormat, suffix, startTime.Location())
 	}
 	panic("invalid interval unit")
 }