cleanuptabnodes triggers garbage collection and expects that the caller not only passes in  deleted node ids but also that the caller will actually honor the decided garbage collection  i e  send tombstones this is not possible for some calling sites  in particular the scenario being fixed here  during restore at least in the current implementation  in future patches  i would split and rename these functions to something like cleanupsession freeunmappedtabs which does no sync gc garbagecollectfreelocaltabnodes std  set int deleted node ids which will trigger gc of sync entities and generate  on the calling site  tombstones 