Giter Club home page Giter Club logo

savage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mtechlanka matjam

savage's Issues

Add support for migrating data between database installations

Issue by luislew
Monday Mar 12, 2018 at 20:35 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/10


Currently, version_id is generated from txid_current(), which is not portable between database installations. As a result, it's not possible to simply dump data from one server to another, because the version ID generation may conflict.

One way to around this issue would be to add a database_version_id, which would be incremented upon a database migration. SavageLogMixin would need to add a database_version_id column, and there would need to be a separate DatabaseVersionId table with a single value (which defaults to 0/1).

Provide option to skip validation on archive model registration

Issue by luislew
Wednesday Feb 21, 2018 at 21:37 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/7


Currently, SavageModelMixin.register(archive_table, engine) calls the _validate methods of both the model and archive model. These model class validations rely on an existing DB engine, which may not be desirable if registration is done during application startup. Adding a validate kwarg to the register method would allow end users to skip this validation (and thus avoid needing an active DB connection).

Add support for versioning within nested transactions

Issue by luislew
Monday Nov 20, 2017 at 06:21 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/3


There is currently a caveat with using savage (see https://github.com/NerdWallet/nwpy-savage#caveats), which is that multiple commits with changes on the same object inside a nested transaction will result in IntegrityError.

Unfortunately, there's currently no way to get a sub-transaction ID in Postgres. However, if the end user doesn't care about anything but the last commit within the nested transaction, then this issue could be solved by adding an ON CONFLICT handler which would overwrite records with identical version IDs. This should be a safe change, because version ID should only be duplicable within a single transaction, but this could also be gated with a configuration setting (e.g. ALLOW_ARCHIVE_OVERWRITES).

JSON/JSONB columns serialized as text inside archive data column

Issue by luislew
Monday Mar 12, 2018 at 20:46 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/11


Example data value:

{
  "created_at": "2018-02-23T21:36:44.325409",
  "data_hash": "be6ebf73-2e2c-ff27-1b3c-9f05d6031340",
  "details": "{\"wp_product_id\": null, \"apy\": 0.01, \"fee_paper_statements\": null, \"cd_deposit_term\": 0, \"display_status\": \"INACTIVE\", \"fee_atm\": null, \"bonus_details\": null, \"account_details\": null, \"offer_logo_url\": null, \"fee_monthly\": null, \"direct_deposit_waive\": null, \"benefits\": null, \"account_holder\": null, \"fee_debit_replacement\": null, \"fee_stop_payment\": null, \"maximum_balance\": 49999, \"manual_entry\": false, \"display_name\": \"INTCK2.5K\", \"related_content\": null, \"fee_overdraft\": null, \"display_tags\": null, \"offer_url\": \"https://www.bannkofamerica.com\", \"bonus_amount\": null, \"fee_early_closure\": null, \"offer_url_monetizing\": null, \"minimum_balance\": 1, \"apy_annotation\": null}",
  "details_override": "{}",
  "ends_at": null,
  "external_id": "14A02086BA5BDCD91AE49F50DAA195302B7761094FAAB59A240EF684CC8C869F",
  "id": "a4b47ea8-18e1-11e8-bbf4-9b03e1f2357f",
  "name": "INTCK2.5K",
  "product_id": "62c84e16-18e1-11e8-b389-8359e5572f80",
  "product_type_name": "banking",
  "starts_at": null,
  "status": "ACTIVE",
  "tags": [],
  "updated_at": "2018-02-23T21:35:38.681501"
}

The details and details_override columns are JSONB columns and could be properly stored as nested JSONB, but instead are stored as serialized JSON strings.

Group archive row inserts by table in after flush handler

Issue by luislew
Monday Nov 20, 2017 at 21:32 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/4


Currently, every archive row insert is executed individually. However, when inserting multiple archive rows for a single table, this could be sped up by batching up writes by table. This will only yield performance gains when writing a large batch of objects, so the work was de-prioritized and I'm logging the issue as a nice to have.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.