Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
CouchDB supports filtering replicated content by doc ids as well as by a given custom filter: http://docs.couchdb.org/en/stable/api/database/changes.html
The request here is to support replication filtering in a generic fashion that includes the a "doc_ids" filter using entity uuids.
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff_8-9.txt | 949 bytes | josephdpurcell |
#9 | 2710947_9.patch | 34.24 KB | josephdpurcell |
#8 | interdiff_3-8.txt | 8.41 KB | josephdpurcell |
#8 | 2710947_8.patch | 34.02 KB | josephdpurcell |
#3 | 2710947_3.patch | 1.73 KB | josephdpurcell |
Comments
Comment #2
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedHere is a quick initial concept of how this might work just to get early feedback. I think at this point it will make sense to have a test on the Changes class.
Comment #3
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commenteduuids are strings!
This patch takes the approach that the doc ids filter does not leverage the same structure as other filters would.
Comment #4
Grayside CreditAttribution: Grayside at Phase2 commentedI would like to test this functionality, what needs to happen before that?
Comment #5
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedHey @grayside, I've completely rewritten the patch to include generic filters. I've created a PR on GitHub just for testing the work and plan to create a patch here sometime later this week: https://github.com/relaxedws/drupal-replication/pull/6
Comment #6
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedUpdating the description to be generic.
Comment #7
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedThere are two pull requests that go hand-in-hand, one for the Replication module (https://github.com/relaxedws/drupal-replication/pull/6) and the other for the Workspace module (https://github.com/timmillwood/drupal-workspace/pull/5). This ticket is for reviewing the Replication module PR, however we should validate that the ReplicationTaskInterface will work well for any ReplicatorInterface, such as in the Workspace module.
Here are a couple important notes about implementation:
Comment #8
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedThis latest patch removes "uuids" from Changes class and ReplicationTask class and makes it a parameter. So, to activate the UUID filter you would pass in filter=uuid and uuids=123,456.
Comment #9
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedThis patch extends #8 by automatically setting the filter to "uuid" if the "uuids" parameter is passed.
Comment #10
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions for Acquia commentedComment #12
jeqqThank you @josephdpurcell!
Comment #13
JamesK CreditAttribution: JamesK at Advisor Websites commented@josephdpurcell this made my day! Awesome work!
Comment #26
jeqq