hanahmily commented on code in PR #674: URL: https://github.com/apache/skywalking-banyandb/pull/674#discussion_r2110590058
########## banyand/protector/protector.go: ########## @@ -103,6 +118,18 @@ func (m *Memory) GetLimit() uint64 { return m.limit } +// AvailableBytes returns the available memory (limit - usage). +func (m *Memory) AvailableBytes() int64 { + if m.limit == 0 { Review Comment: The `GetLimit` function allows access to a limit that may be accessed concurrently. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org