RaveDB-2684 Scratch buffer stuff