[JBoss JIRA] (JGRP-2335) JDBC_PING: code for determining the coordinator hangs in certain conditions
by Bela Ban (Jira)
[ https://issues.jboss.org/browse/JGRP-2335?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-2335:
---------------------------
Summary: JDBC_PING: code for determining the coordinator hangs in certain conditions (was: Code for determining the coordinator hangs in certain conditions)
> JDBC_PING: code for determining the coordinator hangs in certain conditions
> ---------------------------------------------------------------------------
>
> Key: JGRP-2335
> URL: https://issues.jboss.org/browse/JGRP-2335
> Project: JGroups
> Issue Type: Bug
> Reporter: Aieksiei Illarionov
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.1.3
>
>
> Affected version:
> {code:xml}
> <dependency>
> <groupId>org.jgroups</groupId>
> <artifactId>jgroups</artifactId>
> <version>4.0.0.Final</version>
> </dependency>
> {code}
> ClientGmsImpl#joinInternal hangs because #firstOfAllClients always returns false when all of the following conditions are satisfied:
> - using JDBC_PING for discovery protocol
> - JGROUPSPING table contains data from previous sessions
> - all of the previous sessions were killed (kill -9)
> - AddressGenerator is not customized
> The sorted set
> {code:java}
> SortedSet<Address> clients=new TreeSet<>();
> {code}
> contains the dead servers discovered from JGROUPSPING. When the new server is added to the sorted set, it never becomes the first in the sorted set.
> Suggestions: either
> a) somehow involve MembershipChangePolicy in ordering strategy, or
> b) make the new server (joiner) the first in the sorted set, or
> c) make UUID addresses to sort depending on their time of creation.
> I've used the following config:
> {code:xml}
> <!--
> TCP based stack, with flow control and message bundling. This is usually used when IP
> multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast).
> Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
> -Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]
> author: Bela Ban
> -->
> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="urn:org:jgroups"
> xmlns:fork="fork"
> xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd fork http://www.jgroups.org/schema/fork-stacks.xsd">
> <TCP bind_port="7800"
> port_range="10"
> bind_addr="<placeholder here>"
> recv_buf_size="${tcp.recv_buf_size:130k}"
> send_buf_size="${tcp.send_buf_size:130k}"
> max_bundle_size="64K"
> sock_conn_timeout="300"
> thread_pool.min_threads="0"
> thread_pool.max_threads="20"
> thread_pool.keep_alive_time="30000"/>
> <JDBC_PING
> remove_all_data_on_view_change="true"
> connection_driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
> connection_url="jdbc:sqlserver://localhost:1433;databaseName=mydatabase"
> connection_username="user"
> connection_password="password"
> />
> <MERGE3 min_interval="10000"
> max_interval="30000"/>
> <FD_SOCK/>
> <FD timeout="3000" max_tries="3" />
> <VERIFY_SUSPECT timeout="1500" />
> <BARRIER />
> <pbcast.NAKACK2 use_mcast_xmit="false"
> discard_delivered_msgs="true"/>
> <UNICAST3
> conn_close_timeout="240000"
> xmit_interval="5000"/>
> <pbcast.STABLE desired_avg_gossip="50000"
> max_bytes="4M"/>
> <pbcast.GMS print_local_addr="true" join_timeout="2000"
> view_bundling="true"
> membership_change_policy="ru.illar.AppMembershipChangePolicy"/>
> <MFC max_credits="2M"
> min_threshold="0.4"/>
> <FRAG2 frag_size="60K" />
> <!--RSVP resend_interval="2000" timeout="10000"/-->
> <pbcast.STATE_TRANSFER/>
> </config>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (HIBERNATE-167) Map with Enum as key value generates two need unnecessary update statements
by nimo stephan (Jira)
[ https://issues.jboss.org/browse/HIBERNATE-167?page=com.atlassian.jira.plu... ]
nimo stephan updated HIBERNATE-167:
-----------------------------------
Description:
Having this within an Entity class:
{code:java}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
where Task is an Enum:
{code:java}
public enum Task{
TASK_START,
TASK_END
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
{code}
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
was:
Having this within an Entity class:
{code:java}
public enum Task{
TASK_START,
TASK_END
}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
{code}
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
> Map with Enum as key value generates two need unnecessary update statements
> ---------------------------------------------------------------------------
>
> Key: HIBERNATE-167
> URL: https://issues.jboss.org/browse/HIBERNATE-167
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: hibernate-core (v. 5.4.4.Final)
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
> Labels: hibernate
>
> Having this within an Entity class:
> {code:java}
> public class User {
> @Column(name = "test")
> private String test;
> // this makes trouble (but the taskConverter works as expected)
> // only the persisting makes two needless update statements each time a new User is created
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> }
> {code}
> where Task is an Enum:
> {code:java}
> public enum Task{
> TASK_START,
> TASK_END
> }
> {code}
> and creating a new Entity
> {code:java}
> User user = new User();
> user.setName("test");
> // this generates two unnecessary updates:
> user.setTasks(Map.of(Task.TASK_START, "hello"));
> {code}
> creates at first the entity:
> {code:java}
> /* insert my.User
> 11:54:43,848 INFO [stdout] */ insert
> 11:54:43,848 INFO [stdout] into
> 11:54:43,848 INFO [stdout] user
> 11:54:43,855 INFO [stdout] (test, tasks)
> 11:54:43,855 INFO [stdout] values
> 11:54:43,855 INFO [stdout] (?, ?)
> {code}
> *and produces afterwards within the same session two entity updates (which are needless):*
> {code:java}
> /* update
> 11:54:44,100 INFO [stdout] my.User*/ update
> 11:54:44,100 INFO [stdout] user
> 11:54:44,100 INFO [stdout] set
> 11:54:44,100 INFO [stdout] tasks=?
> 11:54:44,100 INFO [stdout] where
> 11:54:44,100 INFO [stdout] id_user=?
> ...
> 11:54:44,157 INFO [stdout] /* update
> 11:54:44,157 INFO [stdout] my.User */ update
> 11:54:44,157 INFO [stdout] user
> 11:54:44,157 INFO [stdout] set
> 11:54:44,157 INFO [stdout] tasks=?
> 11:54:44,158 INFO [stdout] where
> 11:54:44,158 INFO [stdout] id_user=?
> {code}
> *If I replace this:*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> {code}
> *with this (using string instead of enum as key):*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<String, String> tasks;
> {code}
> then all works AND no two needless update statements are produces.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (HIBERNATE-167) Map with Enum as key value generates two need unnecessary update statements
by nimo stephan (Jira)
[ https://issues.jboss.org/browse/HIBERNATE-167?page=com.atlassian.jira.plu... ]
nimo stephan updated HIBERNATE-167:
-----------------------------------
Description:
Having this within an Entity class:
{code:java}
public enum Task{
TASK_START,
TASK_END
}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
{code}
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
was:
Having this within an Entity class:
{code:java}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
{code}
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
> Map with Enum as key value generates two need unnecessary update statements
> ---------------------------------------------------------------------------
>
> Key: HIBERNATE-167
> URL: https://issues.jboss.org/browse/HIBERNATE-167
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: hibernate-core (v. 5.4.4.Final)
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
> Labels: hibernate
>
> Having this within an Entity class:
> {code:java}
> public enum Task{
> TASK_START,
> TASK_END
> }
> public class User {
> @Column(name = "test")
> private String test;
> // this makes trouble (but the taskConverter works as expected)
> // only the persisting makes two needless update statements each time a new User is created
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> }
> {code}
> and creating a new Entity
> {code:java}
> User user = new User();
> user.setName("test");
> // this generates two unnecessary updates:
> user.setTasks(Map.of(Task.TASK_START, "hello"));
> {code}
> creates at first the entity:
> {code:java}
> /* insert my.User
> 11:54:43,848 INFO [stdout] */ insert
> 11:54:43,848 INFO [stdout] into
> 11:54:43,848 INFO [stdout] user
> 11:54:43,855 INFO [stdout] (test, tasks)
> 11:54:43,855 INFO [stdout] values
> 11:54:43,855 INFO [stdout] (?, ?)
> {code}
> *and produces afterwards within the same session two entity updates (which are needless):*
> {code:java}
> /* update
> 11:54:44,100 INFO [stdout] my.User*/ update
> 11:54:44,100 INFO [stdout] user
> 11:54:44,100 INFO [stdout] set
> 11:54:44,100 INFO [stdout] tasks=?
> 11:54:44,100 INFO [stdout] where
> 11:54:44,100 INFO [stdout] id_user=?
> ...
> 11:54:44,157 INFO [stdout] /* update
> 11:54:44,157 INFO [stdout] my.User */ update
> 11:54:44,157 INFO [stdout] user
> 11:54:44,157 INFO [stdout] set
> 11:54:44,157 INFO [stdout] tasks=?
> 11:54:44,158 INFO [stdout] where
> 11:54:44,158 INFO [stdout] id_user=?
> {code}
> *If I replace this:*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> {code}
> *with this (using string instead of enum as key):*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<String, String> tasks;
> {code}
> then all works AND no two needless update statements are produces.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (HIBERNATE-167) Map with Enum as key value generates two need unnecessary update statements
by nimo stephan (Jira)
[ https://issues.jboss.org/browse/HIBERNATE-167?page=com.atlassian.jira.plu... ]
nimo stephan updated HIBERNATE-167:
-----------------------------------
Description:
Having this within an Entity class:
{code:java}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
{code}
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
was:
Having this within an Entity class:
{code:java}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
> Map with Enum as key value generates two need unnecessary update statements
> ---------------------------------------------------------------------------
>
> Key: HIBERNATE-167
> URL: https://issues.jboss.org/browse/HIBERNATE-167
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: hibernate-core (v. 5.4.4.Final)
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
> Labels: hibernate
>
> Having this within an Entity class:
> {code:java}
> public class User {
> @Column(name = "test")
> private String test;
> // this makes trouble (but the taskConverter works as expected)
> // only the persisting makes two needless update statements each time a new User is created
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> }
> {code}
> and creating a new Entity
> {code:java}
> User user = new User();
> user.setName("test");
> // this generates two unnecessary updates:
> user.setTasks(Map.of(Task.TASK_START, "hello"));
> {code}
> creates at first the entity:
> {code:java}
> /* insert my.User
> 11:54:43,848 INFO [stdout] */ insert
> 11:54:43,848 INFO [stdout] into
> 11:54:43,848 INFO [stdout] user
> 11:54:43,855 INFO [stdout] (test, tasks)
> 11:54:43,855 INFO [stdout] values
> 11:54:43,855 INFO [stdout] (?, ?)
> {code}
> *and produces afterwards within the same session two entity updates (which are needless):*
> {code:java}
> /* update
> 11:54:44,100 INFO [stdout] my.User*/ update
> 11:54:44,100 INFO [stdout] user
> 11:54:44,100 INFO [stdout] set
> 11:54:44,100 INFO [stdout] tasks=?
> 11:54:44,100 INFO [stdout] where
> 11:54:44,100 INFO [stdout] id_user=?
> ...
> 11:54:44,157 INFO [stdout] /* update
> 11:54:44,157 INFO [stdout] my.User */ update
> 11:54:44,157 INFO [stdout] user
> 11:54:44,157 INFO [stdout] set
> 11:54:44,157 INFO [stdout] tasks=?
> 11:54:44,158 INFO [stdout] where
> 11:54:44,158 INFO [stdout] id_user=?
> {code}
> *If I replace this:*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> {code}
> *with this (using string instead of enum as key):*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<String, String> tasks;
> {code}
> then all works AND no two needless update statements are produces.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (HIBERNATE-167) Map with Enum as key value generates two need unnecessary update statements
by nimo stephan (Jira)
[ https://issues.jboss.org/browse/HIBERNATE-167?page=com.atlassian.jira.plu... ]
nimo stephan updated HIBERNATE-167:
-----------------------------------
Steps to Reproduce:
1. create a Map with key as Enum and String as value
2. use an AttributeConverter for that Map
3. persist a new Entity having this Map as a property
4. look at the console: you will see two unnecessary update statements for this Map
was:
1. create a Map with key as Enum and String as value
2. use a AttributeConverter for that Map
3. persist a new Entity having this Map as a property
4. look at the console: you will see two unnecessary update statements for this Map
> Map with Enum as key value generates two need unnecessary update statements
> ---------------------------------------------------------------------------
>
> Key: HIBERNATE-167
> URL: https://issues.jboss.org/browse/HIBERNATE-167
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: hibernate-core (v. 5.4.4.Final)
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
> Labels: hibernate
>
> Having this within an Entity class:
> {code:java}
> public class User {
> @Column(name = "test")
> private String test;
> // this makes trouble (but the taskConverter works as expected)
> // only the persisting makes two needless update statements each time a new User is created
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> }
> {code}
> and creating a new Entity
> {code:java}
> User user = new User();
> user.setName("test");
> // this generates two unnecessary updates:
> user.setTasks(Map.of(Task.TASK_START, "hello"));
> {code}
> creates at first the entity:
> {code:java}
> /* insert my.User
> 11:54:43,848 INFO [stdout] */ insert
> 11:54:43,848 INFO [stdout] into
> 11:54:43,848 INFO [stdout] user
> 11:54:43,855 INFO [stdout] (test, tasks)
> 11:54:43,855 INFO [stdout] values
> 11:54:43,855 INFO [stdout] (?, ?)
> {code}
> *and produces afterwards within the same session two entity updates (which are needless):*
> {code:java}
> /* update
> 11:54:44,100 INFO [stdout] my.User*/ update
> 11:54:44,100 INFO [stdout] user
> 11:54:44,100 INFO [stdout] set
> 11:54:44,100 INFO [stdout] tasks=?
> 11:54:44,100 INFO [stdout] where
> 11:54:44,100 INFO [stdout] id_user=?
> ...
> 11:54:44,157 INFO [stdout] /* update
> 11:54:44,157 INFO [stdout] my.User */ update
> 11:54:44,157 INFO [stdout] user
> 11:54:44,157 INFO [stdout] set
> 11:54:44,157 INFO [stdout] tasks=?
> 11:54:44,158 INFO [stdout] where
> 11:54:44,158 INFO [stdout] id_user=?
> {code}
> *If I replace this:*
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<Task, String> tasks;
> *with this (using string instead of enum as key):*
> {code:java}
> @Column(name = "tasks")
> @Convert(converter = TasksConverter.class)
> private Map<String, String> tasks;
> {code}
> then all works AND no two needless update statements are produces.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (HIBERNATE-167) Map with Enum as key value generates two need unnecessary update statements
by nimo stephan (Jira)
nimo stephan created HIBERNATE-167:
--------------------------------------
Summary: Map with Enum as key value generates two need unnecessary update statements
Key: HIBERNATE-167
URL: https://issues.jboss.org/browse/HIBERNATE-167
Project: Hibernate Integration
Issue Type: Bug
Environment: hibernate-core (v. 5.4.4.Final)
Reporter: nimo stephan
Assignee: Steve Ebersole
Having this within an Entity class:
{code:java}
public class User {
@Column(name = "test")
private String test;
// this makes trouble (but the taskConverter works as expected)
// only the persisting makes two needless update statements each time a new User is created
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
}
{code}
and creating a new Entity
{code:java}
User user = new User();
user.setName("test");
// this generates two unnecessary updates:
user.setTasks(Map.of(Task.TASK_START, "hello"));
{code}
creates at first the entity:
{code:java}
/* insert my.User
11:54:43,848 INFO [stdout] */ insert
11:54:43,848 INFO [stdout] into
11:54:43,848 INFO [stdout] user
11:54:43,855 INFO [stdout] (test, tasks)
11:54:43,855 INFO [stdout] values
11:54:43,855 INFO [stdout] (?, ?)
{code}
*and produces afterwards within the same session two entity updates (which are needless):*
{code:java}
/* update
11:54:44,100 INFO [stdout] my.User*/ update
11:54:44,100 INFO [stdout] user
11:54:44,100 INFO [stdout] set
11:54:44,100 INFO [stdout] tasks=?
11:54:44,100 INFO [stdout] where
11:54:44,100 INFO [stdout] id_user=?
...
11:54:44,157 INFO [stdout] /* update
11:54:44,157 INFO [stdout] my.User */ update
11:54:44,157 INFO [stdout] user
11:54:44,157 INFO [stdout] set
11:54:44,157 INFO [stdout] tasks=?
11:54:44,158 INFO [stdout] where
11:54:44,158 INFO [stdout] id_user=?
{code}
*If I replace this:*
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<Task, String> tasks;
*with this (using string instead of enum as key):*
{code:java}
@Column(name = "tasks")
@Convert(converter = TasksConverter.class)
private Map<String, String> tasks;
{code}
then all works AND no two needless update statements are produces.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (DROOLS-4356) Failing test in kie-maven-plugin-example
by Kris Verlaenen (Jira)
[ https://issues.jboss.org/browse/DROOLS-4356?page=com.atlassian.jira.plugi... ]
Kris Verlaenen updated DROOLS-4356:
-----------------------------------
Sprint: 2019 Week 29-31, 2019 Week 32-34 (was: 2019 Week 29-31)
> Failing test in kie-maven-plugin-example
> ----------------------------------------
>
> Key: DROOLS-4356
> URL: https://issues.jboss.org/browse/DROOLS-4356
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Reporter: Luca Molteni
> Assignee: Matteo Mortari
> Priority: Major
>
> Steps to reproduce
> cd droolsjbpm-integration/kie-maven-plugin-example
> mvn clean install
> expected output
> [ERROR] Failures:
> [ERROR] DMNTest.testDMNv1_2_ch11Modified:131 Message [id=0, level=WARNING, path=null, line=1478, column=-1
> text=DMN: Error while evaluating node 'Routing rules': the declared result type is 'DMNType{ http://www.omg.org/spec/DMN/20180521/FEEL/ : number }' but the actual value 'ACCEPT' is not an instance of that type (DMN id: b_RoutingRules, Error evaluating node) ]
> Message [id=0, level=ERROR, path=null, line=492, column=-1
> text=DMN: Error while evaluating node 'Routing': the declared result type is 'DMNType{ http://www.trisotech.com/definitions/_3068644b-d2c7-4b81-ab9d-64f011f81f47 : tRouting }' but the actual value 'null' is not an instance of that type (DMN id: d_Routing, Error evaluating node) ]
> Message [id=0, level=ERROR, path=null, line=537, column=-1
> text=DMN: Unable to evaluate decision 'Adjudication' as it depends on decision 'Routing' (DMN id: d_Adjudication, The referenced node was not found) ]
> Expected: is <false>
> but: was <true>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months
[JBoss JIRA] (DROOLS-4393) Expired events can be present in the collect result
by Kris Verlaenen (Jira)
[ https://issues.jboss.org/browse/DROOLS-4393?page=com.atlassian.jira.plugi... ]
Kris Verlaenen updated DROOLS-4393:
-----------------------------------
Sprint: 2019 Week 29-31, 2019 Week 32-34 (was: 2019 Week 29-31)
> Expired events can be present in the collect result
> ---------------------------------------------------
>
> Key: DROOLS-4393
> URL: https://issues.jboss.org/browse/DROOLS-4393
> Project: Drools
> Issue Type: Feature Request
> Components: core engine
> Affects Versions: 7.24.0.Final
> Reporter: Alberto Fanjul Alonso
> Assignee: Mario Fusco
> Priority: Major
> Attachments: reproducer-02425402.zip
>
>
> Is there any option to expire the facts before fireAllRules()?
> A reproducer for drools 6.5.0.Final-redhat-25 (tested too on 7.23.0.Final-redhat-00002 and 7.24.0.Final) shows that facts are not expired until we run fireAllRules().
> Trying reproducer:
> Show facts are expired after fireAllRules():
> ```
> unzip -d reproducer reproducer-02425402.zip
> cd reproducer
> git checkout master
> ./run.sh
> ```
> Show facts are not expired before fireAllRules():
> ```
> git checkout original
> ./run.sh
> ```
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 9 months