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 23DD0200CB4 for ; Mon, 22 May 2017 22:15:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 22A5E160BBF; Mon, 22 May 2017 20:15:09 +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 6C049160BD4 for ; Mon, 22 May 2017 22:15:08 +0200 (CEST) Received: (qmail 66372 invoked by uid 500); 22 May 2017 20:15:07 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 66306 invoked by uid 99); 22 May 2017 20:15:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 20:15:07 +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 47C59C0351 for ; Mon, 22 May 2017 20:15:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MSstHvVv68OC for ; Mon, 22 May 2017 20:15:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EB3555FDF0 for ; Mon, 22 May 2017 20:15:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 742DCE0D90 for ; Mon, 22 May 2017 20:15:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BC8C721B5D for ; Mon, 22 May 2017 20:15:04 +0000 (UTC) Date: Mon, 22 May 2017 20:15:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@tephra.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEPHRA-228) Introduce client ID that can be used to track requests per client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 22 May 2017 20:15:09 -0000 [ https://issues.apache.org/jira/browse/TEPHRA-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16020113#comment-16020113 ] ASF GitHub Bot commented on TEPHRA-228: --------------------------------------- Github user poornachandra commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/42#discussion_r117834066 --- Diff: tephra-core/src/main/java/org/apache/tephra/runtime/ClientIdAwareTransactionModule.java --- @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tephra.runtime; + +import com.google.inject.AbstractModule; +import com.google.inject.name.Names; +import org.apache.tephra.TransactionSystemClient; +import org.apache.tephra.distributed.TransactionServiceClient; + +/** + * Guice module that binds the clientId to be used in {@link TransactionSystemClient}. + */ +public abstract class ClientIdAwareTransactionModule extends AbstractModule { --- End diff -- Having `ClientIdAwareTransactionModule` as the parent class of Transaction modules does not add much value. Let's move the binding to the child modules. > Introduce client ID that can be used to track requests per client > ----------------------------------------------------------------- > > Key: TEPHRA-228 > URL: https://issues.apache.org/jira/browse/TEPHRA-228 > Project: Tephra > Issue Type: Improvement > Components: api, core > Reporter: Poorna Chandra > Assignee: Gokul Gunasekaran > Fix For: 0.12.0-incubating > > > Today transaction manager does not have details of what transaction belongs to which client. For instance when a there are a lot of invalid transactions generated by a client, it is not easy to say which client generated the invalid transactions. Transaction manager just logs a message saying the transaction ID was invalidated. This makes debugging very difficult since there is no easy way to map the transaction ID to a program. > Transaction APIs should allow clients to pass in client IDs for every start transaction call. Transaction manager can store this client ID as part of the transaction metadata. And when transaction manager logs messages with transaction ID, it can include the client ID in the message. -- This message was sent by Atlassian JIRA (v6.3.15#6346)