RkGrit commented on code in PR #110:
URL: https://github.com/apache/tsfile/pull/110#discussion_r1650290492
##########
cpp/src/writer/tsfile_writer.cc:
##########
@@ -393,15 +433,35 @@ int TsFileWriter::flush() {
so map itself is ordered by device name. */
std::map<std::string, MeasurementSchemaGroup *>::iterator device_iter;
for (device_iter = schemas_.begin(); device_iter != schemas_.end();
- device_iter++) { // cppcheck-suppress postfixOperator
+ device_iter++) {
+
+ if (check_chunk_group_empty(device_iter->second)) {
+ continue;
+ }
+
if (RET_FAIL(io_writer_->start_flush_chunk_group(device_iter->first)))
{
} else if (RET_FAIL(flush_chunk_group(device_iter->second))) {
} else if (RET_FAIL(io_writer_->end_flush_chunk_group())) {
}
Review Comment:
Ok
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]