Cloudkibo / CloudKibo

CloudKibo
0 stars 0 forks source link

Urgent: Data Base Corrupted #481

Closed jekram closed 7 years ago

jekram commented 7 years ago

@sojharo @sumairasaeed

I am sending two screen shots one from Andriod 425-435-4422 and one from iOS 206-851-0628.

I have removed and installed the apps on both of them, so the old data is coming from the server. They do not match. There are messages on Android that was never sent by me.

I do NOT have this issue between Android devices.

Did our database got corrupted or this is a logic issue?

On iOS number of messages from Oct and Nov are missing.

On Andriod as we have time date missing so I cannot tell.

On Android number of messages are not mine: image

On iOS number of messages are not mine: image

I am opening this issue in CloudKibo. Does not mean it belong here.

sojharo commented 7 years ago

I have tested between both androids by doing chat messages and then removed the app. When I reinstalled the app. Both the messages are still there. No message was missing on any side and also there was no any message which was not sent by me. I will not test between two iPhones and between android and iPhone.

sojharo commented 7 years ago

I have now tested between android and iOS. This is how I tested.

  1. I sent 6 chat messages between iOS and android.
  2. I then uninstalled the application on both devices. And reinstalled.
  3. Both devices were able to get all the messages by sync.

No message was shown which was not sent. Also, no sent message went missing. Next, I will test between two iOS devices.

sojharo commented 7 years ago

On test between two iOS devices, I found that messages are not shown at correct place after we do reinstall. It seems that messages have gone missing or there are messages which are not shown as sent on other device. However messages are there but they are not in order and some have gone up in the chat and some are shown below in the chat. Sumaira and I have also discussed what might be the possible error. It is in syncing on iOS side.

sojharo commented 7 years ago

This would be solved on iOS side.

sumairasaeed commented 7 years ago

Tested and debugged the issue. I found that there are some messages in database in which "date" field is missing. On install, if application finds any chat without "date" field so it inserts current datetimestamp. Message re-ordering issue which was found after re-install from iOS to iOS was due to these messages without date. These messages appeared at the end as we are sorting chat messages according to date/time. I also found that all these messages which are without date are from Oct/Nov . This reminded me that I had deleted some of messages from database which were invalid and without date field. this explains why you do not find messages from oct/nov. There are still 68 curropt messages which are without date in database. I am going to delete these invalid messages so we can have clean testing and debugging: Screenshot of message without date: image


Screenshot of message with "date" field: image

jekram commented 7 years ago

Lesson learned it will be better if we inform people if we delete the data so we do not spend time debugging it.

Anyway thanks for the update. I am going to close this.b