This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 62f8f2f [IOTDB-224] fix buffer size and remove cache (#400)
62f8f2f is described below
commit 62f8f2fa616069bc3045c2478637865681de2315
Author: SilverNarcissus <[email protected]>
AuthorDate: Thu Sep 19 13:02:51 2019 +0800
[IOTDB-224] fix buffer size and remove cache (#400)
---
.../main/java/org/apache/iotdb/tsfile/write/record/RowBatch.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/RowBatch.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/RowBatch.java
index 7bcf234..30c1fb7 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/RowBatch.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/RowBatch.java
@@ -148,9 +148,6 @@ public class RowBatch {
* @return total bytes of values
*/
public int getValueBytesSize() {
- if (valueOccupation != -1) {
- return valueOccupation;
- }
valueOccupation = 0;
for (int i = 0; i < measurements.size(); i++) {
switch (measurements.get(i).getType()) {
@@ -170,7 +167,8 @@ public class RowBatch {
valueOccupation += batchSize * 8;
break;
case TEXT:
- for (Binary value: (Binary[]) values[i]) {
+ valueOccupation += batchSize * 4;
+ for (Binary value : (Binary[]) values[i]) {
valueOccupation += value.getLength();
}
break;