How to know when all your links are deleted?

I’m in the process of deleting the links I have just created in order to rearrange my campaign but it doesn’t say where or “When” the deleting has finished?

I pressed start and a few hundred links submitted and now I have had them on “Delete” for the last hour or so with no notifications that they are deleted.

Can anybody help me with this?

What is correct way to ensure that row is not deleted in concurrent transaction

I have 2 tables:

  • Parent (PK id)
  • Child (PK id, parent_id)

Note that parent_id is not defined a foreign key (actually they are not parent/child, I use those names just for example).

I need to handle a case when someone inserts new Child with link to Parent’s row, and someone else deletes Parent’s row. I would like to avoid scenario when DB contains Child row with link to non-existent Parent.

How it works now:

[I1] Insertion Thread: BEGIN [I2] Insertion Thread: SELECT * FROM Parent WHERE id = 3 [D1] Deletion Thread: BEGIN [D2] Deletion Thread: DELETE * FROM Child WHERE parent_id = 3 [D3] Deletion Thread: DELETE * FROM Parent WHERE id = 3 [D4] Deletion Thread: COMMIT [I3] Insertion Thread: INSERT INTO Child VALUES(default, 3) [I4] Insertion Thread: COMMIT 

What I’ve tried to do:

  1. Use SELECT ... FOR UPDATE in insertion thread

    Disadvantage: that will lock Deletion Thread on line D3, but line D2 is already executed at that moment. After Insertion Thread is done, Deletion Thread continue from D3 and will not delete just inserted Child row.

    Solution: swap D2 and D3, so deletion from Parent goes first.

    Disadvantage: a bit fragile. Those SQL statements are called from business logic code, in different places, so it is easy to swap their order back accidentally.

  2. Use REPEATABLE READ isolation level

    Disadvantage: it does not work as I expected. I thought it will abort Insertion Thread’s transaction as selected Parent’s row was deleted in another transaction, but it does not. I suppose it is because I do not perform update of Parent’s row in Insertion Thread, just read.

I’m kinda OK with solution 1 or explicit row locking in the beginning of transaction, but I hope there is more correct way to achieve expected behavior. Maybe I just misused isolation level?

DB is Postgres

Deleted Partition and backing up data on Windows

so in order to make partition to install Ubuntu I have deleted my whole partition on hard disk and I thought all my data was lost. Then I come around notion that my data should be there even if I have deleted partition by mistake. So, I installed third party software and recovered data and transferred to another hard drive. Now, I can see that data is back uped but the size of the files are 0 kb. The directory structure is same as previous stored in drive. Any insights on this would be helpful and suggestion to retrieve this data again.

delete node from linked list (lang w/GC) -should deleted item ‘next’ be set to null

Regarding: delete a node from a linked list algorithm,in procedural languages with garbage-collection. Should there be a step in the algorithm, of setting the removed-node-next-pointer to null ?

(Several high-school-CS-teachers in my area teach YES, while others teach NO)

What is the right approach?

/thanks ran

Can any file be recovered if a new USB fully encrypted first then formatted and copied and deleted without encryption?

I read some advices that, FDE for new USB before using it against to recover deleted data. It’s clear. Assume that I fully encrypt a new USB before copying any file, then format it and then copy personal data without using encryption. In this case, any deleted file can be recovered if it’s deleted normal way or it’s securely erased?

How can I get item’s workflow details/workflow history where workflow association has been deleted?

We have lots of list items where workflow instance is not showing on workflow details page. After researching i found that in sharepoint 2013, completed/suspended/terminated workflow instances will be automatically removed by auto clean up timer job and workflow manager after 30 days.

Due to this we can’t able to get log history/error details of that items. So my question is, Can we get item’s workflow details/history where workflow association has been deleted?

Any help will be appreciated. Thanks

Restore Deleted Site Collection

I’m trying to restore a site collection that has somehow been marked ‘Deleted’. I’ve been unable to restore it, as we’re unable to reference it with any of the following options:

  • Restore-SPDeletedSite <GUID>
  • Get-SPDeletedSite <GUID>, just running Get-SPDeletedSite returns null
  • Checking for it in the Central Admin recycle bin (unsure if this would work)
  • Dismounting and re-mounting the content database
  • Creating a new Site Collection with a subsite, and remounting the old content database

The last option ended up creating a new site collection in our old content database that’s just an empty site collection. Our other sites are still accessible (eg .../sites/Archive), but the root site collection and its subsites are inaccessible.

We know it’s been deleted in some fashion because after going to the SQL server and running a query on the Site Collection in question. The query was:

SELECT [Id],[Deleted]  FROM [Content_Intranet_DB].[dbo].[AllSites]  WHERE ID='DD1CC06F-8BCC-4A0E-B8D1-96A25047BFB4' 

Which returned the following results.

enter image description here

Is there any way to make the root site collection re-accessible/undeleted except for the above attempts?

We don’t have a backup of this, as it’s a UAT/testing environment but there was some people doing development work on it before it disappeared. It looks like all of the content is still present (the database is the same size as before, the site looks like it’s just a toggled deleted flag, etc).