u4819210 / social-networks-for-fun

Automatically exported from code.google.com/p/social-networks-for-fun
0 stars 0 forks source link

group invite throws exception for user JohnLiu #52

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey, cheng.  when call API 
 http://letmecu.com:8080/group/invite-by-user-name/201/JohnLiu to invite user 
with JohnLiu as loginname.
[11/4/10 11:18:44 PM] xlv_array: server got exception:
[11/4/10 11:18:45 PM] xlv_array: 
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No 
row with the given identifier exists: 
[prototype.socialrays.group.GroupEntity#9]; nested exception is 
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: 
[prototype.socialrays.group.GroupEntity#9]
        at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:663)
[11/4/10 11:19:31 PM] anningcun: seems that group 201 doesn't exist
[
11/4/10 11:20:42 PM] JT Xiong: can invite issue be fixed?
[11/4/10 11:21:11 PM] JT Xiong: is group201 map_real_test?
[11/4/10 11:21:31 PM] anningcun: let me check the group
[11/4/10 11:21:48 PM] anningcun: i can see it in the table
[11/4/10 11:22:28 PM] xlv_array: yes,  group 201 exists in db.
[11/4/10 11:24:19 PM] anningcun: looks like somebody is doing sth with group 9
[11/4/10 11:24:31 PM] anningcun: and it doesn't exist
[11/4/10 11:26:21 PM] JT Xiong: whats name of group 9
[11/4/10 11:26:33 PM] JT Xiong: i am using map_real_test

[11/4/10 11:33:41 PM] anningcun: group 9 doesn't exist

[11/5/10 12:02:45 AM] xlv_array: mysql> select * from invitation;
+------+---------------------+-------------+------------------------------------
-+----------+--------------+---------+------------+
| guid | create_time         | description | invitee_email                      
 | status   | invitee_guid | inviter | join_group |
+------+---------------------+-------------+------------------------------------
-+----------+--------------+---------+------------+
|    2 | 2010-08-30 23:33:09 | NULL        | NULL                               
 | ACCEPTED |          894 |     895 |          9 |
[11/5/10 12:03:27 AM] xlv_array: that exception may be related with this 
record.   group 9 is not exist.
[11/5/10 12:15:46 AM] JT Xiong: is this group 9 map_real_test?
[11/5/10 12:16:19 AM] xlv_array: no,  map_real_test's id is 201.
[11/5/10 12:16:39 AM] JT Xiong: then what is this group 9 to do with JohnLiu?
[11/5/10 12:17:06 AM] JT Xiong: and why it threw exception when invite JohnLiu?
[11/5/10 12:17:11 AM] xlv_array: It caused by inconsistent data in db.
[11/5/10 12:17:57 AM] JT Xiong: i don't understand, that means JohnLiu can't be 
invited because of inconsistence in db?
[11/5/10 12:18:53 AM] xlv_array: JohnLiu's id is 894.  maybe server side search 
invitation table to check JohnLiu if he already got invitation for group 
map_real_test.
[11/5/10 12:19:34 AM] JT Xiong: in my old invitations, i did find JohnLiu was 
invited by map_real_test
[11/5/10 12:19:46 AM] JT Xiong: is that the reason?
[11/5/10 12:20:03 AM] JT Xiong: John, are you there?
[11/5/10 12:22:05 AM] xlv_array: I think it's due to  inconsistent data in db.
[11/5/10 12:24:41 AM] JT Xiong: i just tried another group, and invite johnliu 
again, still failed. It seems that johnliu can't be invited anymore
[11/5/10 12:25:59 AM] xlv_array: If user have got invitation for one group, 
servier will return:  
{"code":"InvitationException","errInfo":["InvitationException","1388 is already 
in the group 303"],"msg":"InvitationException.1388 is already in the group 
303."}
[11/5/10 12:26:16 AM] xlv_array: use other loginname to have a try.
[11/5/10 12:26:32 AM] JT Xiong: other loginname is fine
[11/5/10 12:26:37 AM] JT Xiong: i tried lvtest
[11/5/10 12:26:42 AM] JT Xiong: testlv
[11/5/10 12:26:57 AM] JT Xiong: that invite was ok
[11/5/10 12:30:37 AM] John Liu: Im here
[11/5/10 12:31:07 AM] JT Xiong: right now, johnliu can't be invited by any 
groups
[11/5/10 12:31:21 AM] JT Xiong: lv said it's because of inconsistence in db
[11/5/10 12:31:34 AM] John Liu: hmmm, but I don't see any pending invitation I 
can accept
[11/5/10 12:31:58 AM] JT Xiong: in my here, i can see a pending one
[11/5/10 12:32:45 AM] John Liu: so I probably should abandon this user, use a 
new one?
[11/5/10 12:32:58 AM] John Liu: how was the inconsistency created?
[11/5/10 12:33:21 AM] JT Xiong: lv might explain more clearly. Lv?
[11/5/10 12:35:58 AM] xlv_array: mysql> select * from invitation;
+------+---------------------+-------------+------------------------------------
-+----------+--------------+---------+------------+
| guid | create_time         | description | invitee_email                      
 | status   | invitee_guid | inviter | join_group |
+------+---------------------+-------------+------------------------------------
-+----------+--------------+---------+------------+
|    2 | 2010-08-30 23:33:09 | NULL        | NULL                               
 | ACCEPTED |          894 |     895 |          9 |
[11/5/10 12:36:41 AM] xlv_array: 894 is JohnLiu's id.  he got an invatition 
from group 9.  bug group 9 is not exist.
[11/5/10 12:36:44 AM] John Liu: this was an old invitation for group 9 and 
status was accepted. it should have nothing to do with group 201.
[11/5/10 12:36:51 AM] xlv_array: bug->but.
[11/5/10 12:37:21 AM] John Liu: you mean because group 9 doesn't exist anymore 
that broke the check?
[11/5/10 12:37:24 AM] xlv_array: 
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No 
row with the given identifier exists: 
[prototype.socialrays.group.GroupEntity#9]; nested exception is 
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: 
[prototype.socialrays.group.GroupEntity#9]
[11/5/10 12:37:41 AM] xlv_array: maybe it is.
[11/5/10 12:40:36 AM] John Liu: not sure what logic is there ... we should fix 
it
[11/5/10 12:40:57 AM] xlv_array: delete this invitation with id = 2 and restart 
server side to have a try.
[11/5/10 12:41:32 AM] John Liu: I think we should fix the code to handle this 
type of situations
[11/5/10 12:42:13 AM] JT Xiong: I agree. John, could you create a ticket for 
this assigned to Cheng?
[11/5/10 12:42:22 AM] JT Xiong: Cheng can fix this after release
[11/5/10 12:42:38 AM] JT Xiong: he might not have time to do it this week
[11/5/10 12:42:47 AM] John Liu: OK

Original issue reported on code.google.com by johnliu...@gmail.com on 5 Nov 2010 at 7:49