Skip to content

[HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move policyReportFields_ key back into the policy_ key #36170

Closed

Description

@flodnv

Problem & Solution

Sister issue: #36171

Discussed internally, summarised here and concluded there

cc @iwiznia @puneetlath @tgolen @marcaaron @francoisl @dangrous @johnmlee101 @MonilBhavsar

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010e62ab2c798627fa
  • Upwork Job ID: 1755672881949298688
  • Last Price Increase: 2024-02-08

Activity

  1. added
    Daily
    Internal
    on Feb 8, 2024
  2. melvin-bot commented on Feb 8, 2024

    @melvin-bot
  3. melvin-bot commented on Feb 8, 2024

    @melvin-bot

    Triggered auto assignment to Contributor Plus for review of internal employee PR - @mollfpr (Internal)

  4. thienlnam commented on Feb 8, 2024

    @thienlnam
    Contributor

    Sibtain will be handling the FE changes and I will take the BE changes

  5. marcaaron commented on Feb 8, 2024

    @marcaaron
    Contributor

    I am not aware of any documented problem with storing everything related to a policy in the policy_ key.

    Some hypothetical problems to watch out for could be:

    • Large policy JSON is inefficient to modify in Onyx because we do a deep merge (maybe some copying still happens in some places as well).
    • Optimizations exist to deep compare to see if we should update subscribers. Larger the JSON the slower these comparisons would be.
    • Subscribing to a subset of data should result in faster updates than subscribing to a large JSON object. Even with the use of a selector. I think it would still be faster.

    That's all I have to say on it though. I have not instrumented any of that and it's all just theoretical. This proposal looks fine.

  6. flodnv commented on Feb 9, 2024

    @flodnv
    ContributorAuthor

    Large policy JSON is inefficient to modify in Onyx

    How large? Tags is the most bloating data and it's already in its own key (and for now we'll leave it there)

    because we do a deep merge

    Can you expand on "we do a deep merge"? Where and why?


    Thanks for having a look and commenting 🙇

  7. marcaaron commented on Feb 10, 2024

    @marcaaron
    Contributor

    How large? Tags is the most bloating data and it's already in its own key (and for now we'll leave it there)

    I haven't instrumented anything so I can't answer that question.

    Can you expand on "we do a deep merge"? Where and why?

    There is a memory cache layer. Before we save things to the Onyx dbs we merge them into the existing objects in the cache. The smaller those objects are the faster they would be to merge (hypothetically). I am not aware that we've hit any kind of limit there yet - but I do know that it was slow enough in the past that we optimized it to make it faster. We could have someone instrument to see at what point the merges get slow - maybe it's a lot or not.

  8. 47 remaining items

  9. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Mar 27, 2024
  10. changed the title [-][Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/-] [+][HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/+] on Mar 27, 2024
  11. melvin-bot commented on Mar 27, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. removed
    Reviewing
    on Mar 27, 2024
  13. melvin-bot commented on Mar 27, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.56-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-04-03. 🎊

    For reference, here are some details about the assignees on this issue:

  14. JmillsExpensify commented on Apr 3, 2024

    @JmillsExpensify
    Contributor

    Payment summary:

    @jjcoffee Do we need any regression tests for this issue?

  15. JmillsExpensify commented on Apr 3, 2024

    @JmillsExpensify
    Contributor

    Upwork offer sent to C+

  16. jjcoffee commented on Apr 3, 2024

    @jjcoffee
    Contributor

    @JmillsExpensify Accepted, thanks! There should already be regression tests that cover the report fields functionality, so I think we're good here.

  17. JmillsExpensify commented on Apr 3, 2024

    @JmillsExpensify
    Contributor

    Awesome! Contract paid, so closing this issue.

  18. moved this from Release 1: Spring 2024 (May) to Done in #expensify-bugson Apr 3, 2024
  19. laurenreidexpensify commented on May 3, 2024

    @laurenreidexpensify
    Contributor

    Payment summary:

  20. JmillsExpensify commented on May 3, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @allroundexperts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentEngineeringInternalTaskWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions