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

[PublicAsset] Implement updateIdentityIds method for PublicAssetRepository #1073

Open
vttranlina opened this issue May 28, 2024 · 3 comments

Comments

@vttranlina
Copy link
Member

It can help us update partial identities without resetting them.
The method was introduced at pr #1063

with default impl:

  def updateIdentityIds(username: Username, id: PublicAssetId, identityIdsToAdd: Seq[IdentityId], identityIdsToRemove: Seq[IdentityId]): Publisher[Void] =
    SMono(get(username, id))
      .map(publicAsset => (publicAsset.identityIds.toSet ++ identityIdsToAdd.toSet) -- identityIdsToRemove.toSet)
      .flatMap(identityIds => SMono(update(username, id, identityIds)))

We can override it for Cassandra, PostgreSQL impl?

@Arsnael
Copy link
Member

Arsnael commented May 28, 2024

Is it necessary to override this for cassandra and postgres? I dont feel like it is somehow

@chibenwa
Copy link
Member

In the cassandra app we can leverage Caddandra indempotence by using a non frozen set

@chibenwa
Copy link
Member

(so without read-patch-reset logic)

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

No branches or pull requests

3 participants