Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect Azurite to fail when inserting doubles greater than MAX_VALUE but succeeds instead #2387

Closed
richardMSFT opened this issue Apr 11, 2024 · 2 comments · Fixed by #2388
Closed
Assignees
Labels
alignment Alignment between Azurite with Azure Storage production bug Something isn't working table-storage Relating to Azurite table storage implementation

Comments

@richardMSFT
Copy link

Which service(blob, file, queue, table) does this issue concern?

Table storage

Which version of the Azurite was used?

Azurite 3.29.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What's the Node.js version?

v18.15.0

What problem was encountered?

When using azurite emulated table storage, entities that have a property of type Edm.Double who's value is greater than the MAX_VALUE can be upserted successfully, whereas with Azure Table Storage this operation will fail with "InvalidInput: An error occurred while processing this request."

When inserted into emulated table storage, the value of the property in azurite will also be null.

This causes a problem when trying to query/list entities in the table. There will be an error when trying to parse the response body with something similar to:

Error "SyntaxError: Unexpected token 'I', ...","Property10":Infinity,""... is not valid JSON" occurred while parsing the response body

Steps to reproduce the issue?

Create an entity with a property that has the type Edm.Double and a value of the string 13e7705.

Try upserting the entity into Azurite table storage.

Expect the operation to fail, however it succeeds.

Have you found a mitigation/solution?

Have azurite emulate the behavior of table storage and throw an error when trying to insert a number greater than MAX_VALUE.

@blueww blueww self-assigned this Apr 12, 2024
@blueww blueww added bug Something isn't working table-storage Relating to Azurite table storage implementation alignment Alignment between Azurite with Azure Storage production labels Apr 12, 2024
blueww added a commit to blueww/Azurite that referenced this issue Apr 12, 2024
@blueww
Copy link
Member

blueww commented Apr 12, 2024

@richardMSFT

Thanks for raising this issue!
I have raised a PR to fix it: #2388

blueww added a commit that referenced this issue Apr 16, 2024
…eater than MAX_VALUE (Issue #2387) (#2388)

* Fail the insert entity request with double property whose value is greater than MAX_VALUE (Issue #2387)

* Fix a typo

* Add more accurate value in test and comments
@blueww
Copy link
Member

blueww commented Apr 16, 2024

The fix PR is merge. Normally will release in the next Azurite release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alignment Alignment between Azurite with Azure Storage production bug Something isn't working table-storage Relating to Azurite table storage implementation
Projects
None yet
2 participants