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

[WIP] Delete records when visiblity or state change #320

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

eliotjordan
Copy link
Member

No description provided.

@eliotjordan eliotjordan changed the base branch from 102-deletes to main February 18, 2025 21:03
Copy link

Container Scanning Status: ✅ Success


ghcr.io/pulibrary/dpul-collections:pr-320 (debian 12.6)
=======================================================
Total: 0 (HIGH: 0, CRITICAL: 0)

Copy link
Member

@hackartisan hackartisan left a comment

Choose a reason for hiding this comment

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

This is big! I left a few comments but will probably need to look at it again. Thank you!


#### Transformation Consumer

1. Messages with the deleted => kv pair are handled separately.
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to say why they are handled separately. Is there something we could put in the context that would motivate this decision?

#### Transformation Consumer

1. Messages with the deleted => kv pair are handled separately.
1.A special solr document is generated from the deleted object hydration cache
Copy link
Member

Choose a reason for hiding this comment

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

Need a space here

internal_resource: "DeletionMarker",
metadata: %{"resource_id" => [%{"id" => id}]}
}) do
# A CacheMarker for a DeletionMarker resource has a standard timestamp, but
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

@@ -68,6 +68,38 @@ defmodule DpulCollections.IndexingPipeline.Figgy.HydrationConsumer do
|> Broadway.Message.put_data(message_map)
end

@impl Broadway
# pass through messages and write to cache in batcher to avoid race condition
Copy link
Member

Choose a reason for hiding this comment

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

Can we say more about the race condition in this comment? Or point to somewhere else where it's discussed?

Copy link
Member

Choose a reason for hiding this comment

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

Does one of these handle_message clauses handle deletions? Could we add a comment clarifying the patterns matched here?

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.

2 participants