You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DRYing up append/delete should be applied throughout the whole request stack, as the duplication and maintainance burden on this code is getting pretty bad. Additionally in production it appears that some large delete jobs are dying partway through without reporting an error back, leaving the PMD lock screen up. As we don't usually see this for deletes I suspect it might be due to differences between append/delete which should be tidied up and removed.
In theory the primary difference between an append and a delete should just be whether we send a DELETE DATA { .... } or an APPEND DATA { ... } at the bottom. As an aside grafter.rdf has functions append-batched and delete-batched which could possibly be used here too; though they also need to be dried up Swirrl/grafter#115.
DRYing up append/delete should be applied throughout the whole request stack, as the duplication and maintainance burden on this code is getting pretty bad. Additionally in production it appears that some large delete jobs are dying partway through without reporting an error back, leaving the PMD lock screen up. As we don't usually see this for deletes I suspect it might be due to differences between append/delete which should be tidied up and removed.
In theory the primary difference between an append and a delete should just be whether we send a
DELETE DATA { .... }
or anAPPEND DATA { ... }
at the bottom. As an asidegrafter.rdf
has functionsappend-batched
anddelete-batched
which could possibly be used here too; though they also need to be dried up Swirrl/grafter#115.Some examples of the lack of DRYNess here:
drafter/src/drafter/routes/draftsets_api.clj
Lines 209 to 220 in b062fdb
Is almost identical to:
drafter/src/drafter/routes/draftsets_api.clj
Lines 248 to 260 in b062fdb
Then lower down the code is duplicated lots with arbitrary differences (only a few ideally almost none of which are necessary): e.g.
This:
drafter/src/drafter/rdf/draftset_management.clj
Lines 643 to 665 in b062fdb
drafter/src/drafter/rdf/draftset_management.clj
Lines 708 to 726 in b062fdb
Then slightly lower still we have a code tidy attempt applied to append but not delete:
drafter/src/drafter/rdf/draftset_management.clj
Lines 603 to 649 in b062fdb
drafter/src/drafter/rdf/draftset_management.clj
Lines 667 to 706 in b062fdb
The text was updated successfully, but these errors were encountered: