-
Notifications
You must be signed in to change notification settings - Fork 110
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
New "Required field not defined" error is thrown when getting by keys only indexes #538
Comments
Checked the code and |
So this version of the library went onto our production on Wednesday. In the last 24 hours it has produced 480,000 log messages. My thoughts on this new error:
In a later release (maybe next major) the |
Sounds like a good suggestion. We should add to the test to not perform for indexes with projection. But your suggestion to reverse the test to be opt-in would be better. |
There are already a few places in the code that emit warnings if table.warn is true. So we can extend this. With the proposed patch, you can set:
If set (and a whole host of conditions are not true), then a warning will be omitted. This warning is really important if you update your schema and make some fields required, but don't update all items in the database to define the required field. You want to detect that condition. So that is what the warning is for. With opt-in, as you suggest, you can turn it on globally via the schema or on a per-API basis. Thanks for raising the issue. |
Before releasing this, did this patch address the issue? |
Which patch? |
The current repo includes the params.warn and turns warnings off by default. |
Noticed the size of my logs went up about about 50x (no joke).
We have some operations that get thousands of records by an index that is keys only. For every record it spits out an error for every missing required field. For example one request that gets only 200 records, created almost 1000 error messages.
Schema For the Index:
Error: Required field "companyId" in model "Tech" not defined in table item
I saw there is a
noerror
param. Will that turn off all errors or just this "not defined" one? As I still want to catch real errors but currently the size of the logs is starting to cost us money as we pay for Kloudmate by the amount of logs ingested.Otherwise I might have to revert to an older version until this is resolved.
I do feel like this error shouldn't have just been turned on by default, there could have been some flag to switch it on for now that could have been defaulted to on in a later version once any teething problems were resolved.
The text was updated successfully, but these errors were encountered: