[Feature] Database Write Efficiency #52

Closed
opened 2022-06-03 16:23:00 +00:00 by abdulrabbani00 · 0 comments
abdulrabbani00 commented 2022-06-03 16:23:00 +00:00 (Migrated from github.com)

Table of contents generated with markdown-toc

Overview

Request

  1. Use a transaction to write slots. In case of a shutdown, we don't want to have only written to some tables and not others.
  2. Check the DB to see if a slot exists prior to processing it. This can be a configurable flag.

Potential Solution

  1. Integrate a transaction.
  2. Query the DB to check the entry within the ethcl.slots, ethcl.signed_beacon_block, and ethcl.signed_beacon_state table.
    a. If the entry exists in all tables, then we don't need to reprocess it.

Alternative Solutions

Additional Context

- [Overview](#overview) - [Request](#request) - [Potential Solution](#potential-solution) - [Alternative Solutions](#alternative-solutions) - [Additional Context](#additional-context) <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> # Overview - **Requester**: @abdulrabbani00 - **Epic Link**: https://github.com/vulcanize/ipld-ethcl-indexer/issues/42 ## Request <!--- Explain what you want and why. If this feature is related to a problem please highlight it here.** ---> 1. Use a transaction to write slots. In case of a shutdown, we don't want to have only written to some tables and not others. 2. Check the DB to see if a slot exists prior to processing it. This can be a configurable flag. # Potential Solution 1. Integrate a transaction. 2. Query the DB to check the entry within the `ethcl.slots`, `ethcl.signed_beacon_block`, and `ethcl.signed_beacon_state` table. a. If the entry exists in all tables, then we don't need to reprocess it. <!---Provide any details for a potential solution. ---> ## Alternative Solutions <!---Provide any alternative solutions. ---> # Additional Context <!---Provide Additional Context. --->
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-beacon-indexer#52
No description provided.