Return-Path: X-Original-To: apmail-samza-dev-archive@minotaur.apache.org Delivered-To: apmail-samza-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D9251830F for ; Thu, 28 Jan 2016 19:36:40 +0000 (UTC) Received: (qmail 13751 invoked by uid 500); 28 Jan 2016 19:36:39 -0000 Delivered-To: apmail-samza-dev-archive@samza.apache.org Received: (qmail 13690 invoked by uid 500); 28 Jan 2016 19:36:39 -0000 Mailing-List: contact dev-help@samza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@samza.apache.org Delivered-To: mailing list dev@samza.apache.org Received: (qmail 13673 invoked by uid 99); 28 Jan 2016 19:36:39 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 19:36:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E13B1C3296 for ; Thu, 28 Jan 2016 19:36:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.122 X-Spam-Level: X-Spam-Status: No, score=-0.122 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=homeaway.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 1aNK3HkLoPuF for ; Thu, 28 Jan 2016 19:36:32 +0000 (UTC) Received: from smtpout.homeawaycorp.com (smtpout.homeawaycorp.com [64.245.52.17]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id E248142A26 for ; Thu, 28 Jan 2016 19:36:31 +0000 (UTC) Received: from mailq.homeawaycorp.com (unknown [10.28.126.251]) by smtpout.homeawaycorp.com (Postfix) with ESMTP id 56D371108E58 for ; Thu, 28 Jan 2016 13:36:25 -0600 (CST) Received: from ascmail004.wvrgroup.internal (unknown [10.28.126.251]) by mailq.homeawaycorp.com (Postfix) with ESMTP id 5041014C5D3 for ; Thu, 28 Jan 2016 13:36:25 -0600 (CST) Received: from ascmail004.wvrgroup.internal (10.28.1.165) by ascmail004.wvrgroup.internal (10.28.1.165) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Thu, 28 Jan 2016 13:36:24 -0600 Received: from na01-bl2-obe.outbound.protection.outlook.com (207.46.163.207) by ascmail004.wvrgroup.internal (10.28.1.165) with Microsoft SMTP Server (TLS) id 15.0.1130.7 via Frontend Transport; Thu, 28 Jan 2016 13:36:24 -0600 Received: from BY2PR08MB013.namprd08.prod.outlook.com (10.242.35.11) by BY2PR08MB015.namprd08.prod.outlook.com (10.242.35.21) with Microsoft SMTP Server (TLS) id 15.1.365.19; Thu, 28 Jan 2016 19:36:22 +0000 Received: from BY2PR08MB013.namprd08.prod.outlook.com ([169.254.7.215]) by BY2PR08MB013.namprd08.prod.outlook.com ([169.254.7.215]) with mapi id 15.01.0390.016; Thu, 28 Jan 2016 19:36:22 +0000 From: David Garcia To: "dev@samza.apache.org" Subject: Re: ChangeLog Question for TTL rocksDB stores Thread-Topic: ChangeLog Question for TTL rocksDB stores Thread-Index: AQHRWXJR/XJFw5n5J0meARQQ4omxAJ8QOUOAgAC1lgA= Date: Thu, 28 Jan 2016 19:36:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dgarcia@homeaway.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [64.245.52.2] x-microsoft-exchange-diagnostics: 1;BY2PR08MB015;5:8uXtSzfNA5wOe5bKpVJM476qzeISyaikZ7xYjvHwANOMhwxQfaO93LKowLYlSe3pQiBLNP798KkTvxvRZvBR2iNz0UKlDMscSGSP/fIz0/S3P7w6fLoEl2oGjOvJK/mMN8xQqIa+nK7fiKy34p8Ezw==;24:douUgdm3+AeB8nsMkWo59/uSOd94A0T/UGoDQ6Lc/vMxgEDChGPzwDI8tH7zgKv3msqhVFBTIDTRK+xy4aq6QuQGnirUINlhXgo1LKh7f/o= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR08MB015; x-ms-office365-filtering-correlation-id: fc6d9529-d215-4fcb-960e-08d3281a4d8c x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2PR08MB015;BCL:0;PCL:0;RULEID:;SRVR:BY2PR08MB015; x-forefront-prvs: 083526BF8A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(479174004)(24454002)(377454003)(189002)(199003)(54534003)(5001960100002)(3846002)(102836003)(54356999)(2950100001)(1096002)(97736004)(107886002)(2900100001)(11100500001)(2351001)(19580395003)(110136002)(586003)(106116001)(3470700001)(106356001)(101416001)(50986999)(5002640100001)(105586002)(189998001)(66066001)(99286002)(76176999)(1220700001)(3280700002)(5008740100001)(2906002)(87936001)(122556002)(19580405001)(6116002)(10400500002)(5004730100002)(81156007)(10090500001)(86362001)(36756003)(450100001)(92566002)(40100003)(2501003)(3660700001)(59356010)(207903002)(219803003)(94096001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR08MB015;H:BY2PR08MB013.namprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: homeaway.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jan 2016 19:36:21.7515 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e3833796-b508-4841-83ae-38f7823ef2ae X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR08MB015 X-OrganizationHeadersPreserved: BY2PR08MB015.namprd08.prod.outlook.com X-CrossPremisesHeadersPromoted: ascmail004.wvrgroup.internal X-CrossPremisesHeadersFiltered: ascmail004.wvrgroup.internal X-OriginatorOrg: homeaway.com Ok, that makes sense. I had assumed that the changelog was supported because the docs mention that TTL is enforced upon =B3compaction=B2 (I had assumed compaction of the DB changelog). Which topic does the TTL policy listen for the compaction of (since compaction policies of topics can differ)? -David On 1/27/16, 8:46 PM, "Jacob Maes" wrote: >Here's my understanding. The others can correct me if I'm mistaken. > >Samza provides the changelog functionality by intercepting RocksDB "put" >and "delete" operations. However, TTL is managed by RocksDB internally and >there aren't any hooks exposed in the RocksDB JNI. So there are 2 problems >that arise with TTL and change logging: >1. Samza doesn't know when an entry expires, so it can't delete the >expired >entry from the changelog. >2. The changelog currently has no concept of entry age/timestamp, so when >the changelog is restored, it's unknown whether some subset (or all) of >the >entries should be immediately expired. > >These issues aren't insurmountable, but they weren't pursued for the >initial implementation. Perhaps because there was a shortage of use cases >that needed both TTL and changelogging, but I'm not sure. > >-Jake > >On Wed, Jan 27, 2016 at 6:19 PM, David Garcia > >wrote: > >> So, I saw this very scary message: >> >> >> ERROR - e.kv.RocksDbKeyValueStore$ - sessionJoinStore is a TTL based >> store, changelog is not supported for TTL based stores, use at your own >> discretion >> >> >> >> >> A few of questions: >> >> 1.) Does this mean that this store is NOT backed by the changelog? >> >> 2.) Provided that the store IS backed by a change log, do the TTL >> expirations commit removals from the changelog (I.e. Nulls)...presumably >> upon compaction >> >> 3.) Can I please get a bit more detail on how TTL affects a changelog >> store? >> >> >> -David >>