Skip to content

Conversation

@jansimonb
Copy link
Contributor

@jansimonb jansimonb commented May 28, 2025

The issue

If the client is configured as:

InfluxDBClient client = InfluxDBClient.getInstance(
  new ClientConfig.Builder().host(host).token(token).database(database)
    .writePrecision(WritePrecision.S).build())

then the

client.writeRecord(r)

ignores the configured write precision and uses the default precision.

Proposed Changes

The following 4 write functions in InfluxDBClientImpl now are getting WriteOptions from ClientConfig config, (instead of the previously usedWriteOptions.DEFAULTS):

public void writeRecord(@Nullable final String record)
public void writeRecords(@Nonnull final List<String> records)
public void writePoint(@Nullable final Point point)
public void writePoints(@Nonnull final List<Point> points)

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@codecov
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.11%. Comparing base (1f1ac3f) to head (83e3fdd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   90.10%   90.11%           
=======================================
  Files          20       20           
  Lines        1193     1194    +1     
  Branches      187      187           
=======================================
+ Hits         1075     1076    +1     
  Misses         41       41           
  Partials       77       77           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jansimonb jansimonb marked this pull request as ready for review May 28, 2025 09:21
Base automatically changed from feat/no-sync-write to main June 3, 2025 21:31
@jansimonb jansimonb mentioned this pull request Jun 3, 2025
6 tasks
Copy link
Contributor

@karel-rehor karel-rehor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass locally. All changes make sense. 🚴 🏁

@jansimonb jansimonb merged commit d1560cb into main Jun 4, 2025
9 checks passed
@jansimonb jansimonb deleted the fix/default-write-options branch June 4, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants