Skip to content

perf: optimize psql indexer (backport #2142)#2234

Merged
melekes merged 2 commits intov1.xfrom
mergify/bp/v1.x/pr-2142
Feb 5, 2024
Merged

perf: optimize psql indexer (backport #2142)#2234
melekes merged 2 commits intov1.xfrom
mergify/bp/v1.x/pr-2142

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 5, 2024

This is an automatic backport of pull request #2142 done by Mergify.
Cherry-pick of 52ec996 has failed:

On branch mergify/bp/v1.x/pr-2142
Your branch is up to date with 'origin/v1.x'.

You are currently cherry-picking commit 52ec9964a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .changelog/unreleased/improvements/2142-psql-optimization.md

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/state/indexer/sink/psql/psql.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Closes #1618
Closes #1532

Optimizes the psql indexer by using bulk inserts. For the use case
outlined in #1618 it brings down indexing time to < 1s (x20 boost).

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Co-authored-by: Adi Seredinschi <a@seredinschi.net>
Co-authored-by: Adi Seredinschi <adizere@gmail.com>
(cherry picked from commit 52ec996)

# Conflicts:
#	internal/state/indexer/sink/psql/psql.go
@mergify mergify bot requested a review from a team as a code owner February 5, 2024 06:11
@mergify mergify bot requested a review from a team February 5, 2024 06:11
@mergify mergify bot added the conflicts label Feb 5, 2024
@melekes melekes merged commit bfa7252 into v1.x Feb 5, 2024
@melekes melekes deleted the mergify/bp/v1.x/pr-2142 branch February 5, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants