iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

fix return success when insert exception

Open dh-cloud opened this issue 2 years ago • 2 comments

Description

fix bug when insert error, but can't catch exception, and return success, this scenario may mislead data loss


This PR has:

  • [x] been self-reviewed.
    • [ ] concurrent read
    • [ ] concurrent write
    • [ ] concurrent read and write
  • [ ] added documentation for new or modified features or behaviors.
  • [ ] added Javadocs for most classes and all non-trivial methods.
  • [ ] added or updated version, license, or notice information
  • [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.
  • [ ] added integration tests.
  • [ ] been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

dh-cloud avatar Feb 22 '23 11:02 dh-cloud

Hi, do you have any test cases to reproduce this bug?

HTHou avatar Feb 24 '23 10:02 HTHou

Hi, do you have any test cases to reproduce this bug? @HTHou client: int res[] = statement.executeBatch() if (res[0] == 200) {count++;}

client continue insert value , then one node poweroff (or breakpoint), the insert count is inconsistent with query from iotdb

dh-cloud avatar Feb 27 '23 08:02 dh-cloud