OmCheeLin commented on code in PR #674:
URL: 
https://github.com/apache/skywalking-banyandb/pull/674#discussion_r2109272991


##########
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:
   `limit` is only assigned a value in `PreRun` and is unlikely to be modified 
dynamically afterward, so there probably won't be any thread safety issues.



-- 
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

Reply via email to