Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0DDAD200BEE for ; Sat, 17 Dec 2016 00:31:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0C665160B32; Fri, 16 Dec 2016 23:31:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 59639160B24 for ; Sat, 17 Dec 2016 00:30:59 +0100 (CET) Received: (qmail 21130 invoked by uid 500); 16 Dec 2016 23:30:58 -0000 Mailing-List: contact issues-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list issues@aurora.apache.org Received: (qmail 21118 invoked by uid 99); 16 Dec 2016 23:30:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2016 23:30:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 733F72C03DD for ; Fri, 16 Dec 2016 23:30:58 +0000 (UTC) Date: Fri, 16 Dec 2016 23:30:58 +0000 (UTC) From: "David McLaughlin (JIRA)" To: issues@aurora.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AURORA-1861) Remove duplicate Snapshot fields for DB stores MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 16 Dec 2016 23:31:00 -0000 [ https://issues.apache.org/jira/browse/AURORA-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David McLaughlin updated AURORA-1861: ------------------------------------- Attachment: snapshot-total-time.png > Remove duplicate Snapshot fields for DB stores > ---------------------------------------------- > > Key: AURORA-1861 > URL: https://issues.apache.org/jira/browse/AURORA-1861 > Project: Aurora > Issue Type: Task > Components: Scheduler > Reporter: David McLaughlin > Assignee: David McLaughlin > Attachments: snapshot-total-time.png > > > Currently we double-write any DB-backed stores into a Snapshot struct when creating a Snapshot. This inflates the size of the Snapshot, which is already a problem for large production clusters (see AURORA-74). > Example for LockStore from https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java: > {code} > new SnapshotField() { > // It's important for locks to be replayed first, since there are relations that expect > // references to be valid on insertion. > @Override > public void saveToSnapshot(MutableStoreProvider store, Snapshot snapshot) { > snapshot.setLocks(ILock.toBuildersSet(store.getLockStore().fetchLocks())); > } > @Override > public void restoreFromSnapshot(MutableStoreProvider store, Snapshot snapshot) { > if (hasDbSnapshot(snapshot)) { > LOG.info("Deferring lock restore to dbsnapshot"); > return; > } > store.getLockStore().deleteLocks(); > if (snapshot.isSetLocks()) { > for (Lock lock : snapshot.getLocks()) { > store.getLockStore().saveLock(ILock.build(lock)); > } > } > } > }, > {code} > The saveToSnapshot here is totally redundant as the entire H2 database is dumped into the dbScript field. > Note: one major side-effect here is if anyone is trying to read these snapshots and utilize the data outside of Java - they'll lose the ability to process the data without being able to apply the DB script. -- This message was sent by Atlassian JIRA (v6.3.4#6332)