Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more determinism in delete order (forward port of #16401) #16471

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

BryceStansfieldAt-da
Copy link
Contributor

@BryceStansfieldAt-da BryceStansfieldAt-da commented Mar 7, 2023

Port #16401 and #16448 from 2.3.x to main.

@S11001001 S11001001 added component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components. concern/performance labels Mar 7, 2023
@S11001001 S11001001 changed the title Forward port of https://github.com/digital-asset/daml/pull/16401 (more determinism in delete order) more determinism in delete order (forward port of #16401) Mar 7, 2023
Copy link
Contributor

@S11001001 S11001001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included suggestions as commits on the branch; @BryceStansfieldAt-da please take a look and merge if you have no followups to those.

@ray-roestenburg-da could you take a second look, as the determinism logic has necessarily changed for interface support, please?

Comment on lines 8 to 15
import nonempty.{NonEmpty, +-:}
import nonempty.{+-:, NonEmpty}
import nonempty.NonEmptyReturningOps._

import doobie._
import doobie.implicits._

import scala.annotation.nowarn
import scala.collection.immutable.{Seq => ISeq, SortedMap}
import scalaz.{@@, Cord, Functor, OneAnd, Tag, \/, -\/, \/-}
import scala.collection.immutable.{SortedMap, Seq => ISeq}
import scalaz.{-\/, @@, Cord, Functor, OneAnd, Tag, \/, \/-}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

templateId,
)
)
.via(conflation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 343 to 344
Update[String](s"DELETE FROM $contractTableNameRaw WHERE contract_id = ?")
.updateMany(cids.values.flatten.toSeq.sorted)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must also include tpid; see #16401 checklist. d6db66f

@S11001001 S11001001 merged commit b7bcbae into main Mar 8, 2023
@S11001001 S11001001 deleted the forward-port-16401 branch March 8, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/json-api HTTP JSON API concern/performance team/ledger-clients Related to the Ledger Clients team's components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants