Merge a temporary log-structured tree into a primary tree.