|
this.sizeBytesToRequest.addAndGet(responseBytesSize); |
The backpressure API in topics allows to specify the amount of memory that server can fill with messages. Server can send a bit more (less than a single message size). So, we can increase this variable sizeBytesToRequest several times and actual amount of requested memory can slowly increase. Read session must not send sizeBytesToRequest greater that MaxMemoryUsageBytes. Adeally, it must send to server MaxMemoryUsageBytes - usedBytes, where usedBytes is the amount of bytes used by the session.
ydb-java-sdk/topic/src/main/java/tech/ydb/topic/read/impl/ReaderImpl.java
Line 475 in 3306904
The backpressure API in topics allows to specify the amount of memory that server can fill with messages. Server can send a bit more (less than a single message size). So, we can increase this variable
sizeBytesToRequestseveral times and actual amount of requested memory can slowly increase. Read session must not send sizeBytesToRequest greater thatMaxMemoryUsageBytes. Adeally, it must send to serverMaxMemoryUsageBytes - usedBytes, whereusedBytesis the amount of bytes used by the session.