apache / apache/tsfile

[CPP].Does the CPP version support append writing?

Open
#252 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
203
Forks
104
Avg merge
2d 6h
Merged PRs (30d)
33

Description

Does the C++ version support appending to files? I haven't found any examples of appending in the test and sample code; it seems like the file is deleted and recreated each time, whereas the Java version does support appending。

C++
```
int TsFileWriter::open(const std::string &file_path, int flags, mode_t mode) {
if (check_file_exist(file_path)) {
return E_ALREADY_EXIST;
}
```

java
```
try (ForceAppendTsFileWriter fwriter = new ForceAppendTsFileWriter(f)) {
fwriter.doTruncate();
write(fwriter);
} catch (Exception e) {
LOGGER.error("ForceAppendTsFileWriter truncate or write error ", e);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the C++ TsFileWriter::open method shown in the issue and compare its file-existence handling with the Java ForceAppendTsFileWriter example. Then inspect the C++ tests and sample code for append or truncate cases. Done means the C++ append behavior is clearly established and covered by an appropriate test or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, java
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.