Skip to content

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Jan 6, 2025

Fixes #XXXX.

Description

Only "true" is valid, deserializing anything else is not allowed, if the field doesn't exist only then value is set to false, this is perfectly fine when reading from file and this will not impact previous behaviour since we also serialize only true as "true" and ignore false value(as we have been doing previously).

This improve perf by not having to pass along an entire String, and being able to make do with a bool, in memory.


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Devdutt Shenoi added 2 commits January 6, 2025 14:15
NOTE: Only "true" is valid, deserializing anything else is not allowed, if the field doesn't exist only then value is set to false, this is perfectly fine because we are reading from file and this will not impact previous behvaiour as well
@de-sh de-sh changed the title refactor: static_schema_flag: bool refactor: use bools for flags Jan 6, 2025
@coveralls
Copy link

coveralls commented Jan 6, 2025

Pull Request Test Coverage Report for Build 12654063585

Details

  • 112 of 151 (74.17%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 12.354%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/handlers/http/modal/utils/ingest_utils.rs 1 2 50.0%
src/kafka.rs 0 1 0.0%
src/utils/json/mod.rs 94 95 98.95%
src/handlers/http/ingest.rs 12 14 85.71%
src/storage/object_storage.rs 0 2 0.0%
src/handlers/http/logstream.rs 0 3 0.0%
src/storage/mod.rs 0 3 0.0%
src/metadata.rs 0 4 0.0%
src/handlers/http/modal/utils/logstream_utils.rs 0 22 0.0%
Totals Coverage Status
Change from base Build 12652476891: 0.4%
Covered Lines: 2407
Relevant Lines: 19483

💛 - Coveralls

Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable left a comment

Choose a reason for hiding this comment

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

good to merge

@nitisht nitisht merged commit a4bf963 into parseablehq:main Jan 8, 2025
9 checks passed
@de-sh de-sh deleted the refactor branch January 8, 2025 04:08
parmesant pushed a commit to parmesant/parseable that referenced this pull request Jan 13, 2025
NOTE: Only "true" is valid, de-serializing anything else is not allowed, 
if the field doesn't exist only then value is set to false, this is perfectly 
fine because we are reading from file and this will not impact previous
behaviour as well
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.

4 participants