From issues-return-100863-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Tue Oct 15 08:52:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C9EEB180651 for ; Tue, 15 Oct 2019 10:52:01 +0200 (CEST) Received: (qmail 12943 invoked by uid 500); 15 Oct 2019 08:52:01 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 12930 invoked by uid 99); 15 Oct 2019 08:52:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2019 08:52:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 943CEE3015 for ; Tue, 15 Oct 2019 08:52:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 1533678050C for ; Tue, 15 Oct 2019 08:52:00 +0000 (UTC) Date: Tue, 15 Oct 2019 08:52:00 +0000 (UTC) From: "Pavel Tupitsyn (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-6804) Print a warning if HashMap is passed into bulk update operations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-6804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951734#comment-16951734 ] Pavel Tupitsyn commented on IGNITE-6804: ---------------------------------------- [~ilyak] # I've fixed collection class references in the docs (generic specification is mandatory there), pushed the branch (hope it's ok for you). # "will lead to deadlock" is not technically correct, I would change it to "may lead to deadlock". # Yes, we can do it in C# the same way as in Java. But I don't see how the warning is "throttled" - looks like it will be displayed on every operation, am I missing something? > Print a warning if HashMap is passed into bulk update operations > ---------------------------------------------------------------- > > Key: IGNITE-6804 > URL: https://issues.apache.org/jira/browse/IGNITE-6804 > Project: Ignite > Issue Type: Improvement > Components: cache > Reporter: Denis A. Magda > Assignee: Ilya Kasnacheev > Priority: Critical > Labels: usability > Time Spent: 10m > Remaining Estimate: 0h > > Ignite newcomers tend to stumble on deadlocks simply because the keys are passed in an unordered HashMap. Propose to do the following: > * update bulk operations Java docs. > * print out a warning if not SortedMap (e.g. HashMap, Weak/Identity/Concurrent/Linked HashMap etc) is passed into > a bulk method (instead of SortedMap) and contains more than 1 element. However, we should make sure that we only print that warning once and not every time the API is called. > * do not produce warning for explicit optimistic transactions > More details are here: > http://apache-ignite-developers.2346864.n4.nabble.com/Re-Ignite-2-0-0-GridUnsafe-unmonitor-td23706.html -- This message was sent by Atlassian Jira (v8.3.4#803005)