Eliminate deadlock on CurrentTokenBalance insertion

vb-test-deadlocks
Victor Baranov 4 years ago
parent bc77dc79fd
commit 2ddc880a35
  1. 2
      apps/explorer/lib/explorer/chain/import/runner/address/current_token_balances.ex

@ -201,7 +201,7 @@ defmodule Explorer.Chain.Import.Runner.Address.CurrentTokenBalances do
on_conflict = Map.get_lazy(options, :on_conflict, &default_on_conflict/0)
# Enforce CurrentTokenBalance ShareLocks order (see docs: sharelocks.md)
ordered_changes_list = Enum.sort_by(changes_list, &{&1.address_hash, &1.token_contract_address_hash})
ordered_changes_list = Enum.sort_by(changes_list, &{&1.token_contract_address_hash, &1.address_hash})
Import.insert_changes_list(
repo,

Loading…
Cancel
Save