Skip to content

Kafka ingest: commit offset only after the TRoE write succeeds - #1968

Closed
cfrey-de wants to merge 13 commits into
FIWARE:developfrom
cfrey-de:fix/kafka-troe-durability-before-offset-commit
Closed

Kafka ingest: commit offset only after the TRoE write succeeds#1968
cfrey-de wants to merge 13 commits into
FIWARE:developfrom
cfrey-de:fix/kafka-troe-durability-before-offset-commit

TRoE Kafka NACK: carry the underlying Postgres/Mongo error, not just …

4d9a42d
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 6, 2026 in 5m 28s

Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 363 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ82Qrvk5HXsydqH9HnH&open=AZ82Qrvk5HXsydqH9HnH&pullRequest=1968

Check warning on line 176 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Convert this string literal to a raw string literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqc&open=AZ8nBEQb00wtKe1XFpqc&pullRequest=1968

Check failure on line 201 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "free".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqN&open=AZ8nBEQb00wtKe1XFpqN&pullRequest=1968

Check warning on line 96 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Convert this string literal to a raw string literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpqv&open=AZ8nBEUm00wtKe1XFpqv&pullRequest=1968

Check warning on line 239 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpq7&open=AZ8nBEUm00wtKe1XFpq7&pullRequest=1968

Check warning on line 171 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpq5&open=AZ8nBEUm00wtKe1XFpq5&pullRequest=1968

Check failure on line 121 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpqx&open=AZ8nBEUm00wtKe1XFpqx&pullRequest=1968

Check failure on line 52 in src/lib/orionld/troe/pgCommands.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ82Qr1v5HXsydqH9HnK&open=AZ82Qr1v5HXsydqH9HnK&pullRequest=1968

Check failure on line 151 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqO&open=AZ8nBEQb00wtKe1XFpqO&pullRequest=1968

Check failure on line 165 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqX&open=AZ8nBEQb00wtKe1XFpqX&pullRequest=1968

Check failure on line 161 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqT&open=AZ8nBEQb00wtKe1XFpqT&pullRequest=1968

Check warning on line 32 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqt&open=AZ8nBEQb00wtKe1XFpqt&pullRequest=1968

Check warning on line 343 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::format" or "std::format_to_n" instead of "snprintf".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFprA&open=AZ8nBEUm00wtKe1XFprA&pullRequest=1968

Check warning on line 25 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqs&open=AZ8nBEQb00wtKe1XFpqs&pullRequest=1968

Check warning on line 162 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqL&open=AZ8nBEQb00wtKe1XFpqL&pullRequest=1968

Check warning on line 359 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::format" or "std::format_to_n" instead of "snprintf".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ82Qrvk5HXsydqH9HnE&open=AZ82Qrvk5HXsydqH9HnE&pullRequest=1968

Check failure on line 346 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpq3&open=AZ8nBEUm00wtKe1XFpq3&pullRequest=1968

Check warning on line 96 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::format" or "std::format_to_n" instead of "snprintf".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpqu&open=AZ8nBEUm00wtKe1XFpqu&pullRequest=1968

Check warning on line 220 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqi&open=AZ8nBEQb00wtKe1XFpqi&pullRequest=1968

Check warning on line 503 in src/lib/orionld/common/orionldState.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ82Qr045HXsydqH9HnI&open=AZ82Qr045HXsydqH9HnI&pullRequest=1968

Check warning on line 129 in src/lib/orionld/kafka/kafkaConsumerLoop.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string_view::contains" instead of "strstr".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEUm00wtKe1XFpq0&open=AZ8nBEUm00wtKe1XFpq0&pullRequest=1968

Check warning on line 219 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqh&open=AZ8nBEQb00wtKe1XFpqh&pullRequest=1968

Check warning on line 162 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure use of "strlen" is safe here.

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqU&open=AZ8nBEQb00wtKe1XFpqU&pullRequest=1968

Check failure on line 225 in src/lib/orionld/kafka/kafkaAckProducer.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "free".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ8nBEQb00wtKe1XFpqr&open=AZ8nBEQb00wtKe1XFpqr&pullRequest=1968

Check warning on line 55 in src/lib/orionld/troe/pgCommands.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::format" or "std::format_to_n" instead of "snprintf".

See more on https://sonarcloud.io/project/issues?id=FIWARE_context.Orion-LD&issues=AZ82Qr1u5HXsydqH9HnJ&open=AZ82Qr1u5HXsydqH9HnJ&pullRequest=1968