从数据库设计分析UCH的消息BUG
先看BUG现象:
- 用户A发送给B一条消息。此时A,B在消息中都能看到对应的消息
- 其中一个用户,如A,删除消息。此时A看不到消息,B能看到
- 用户A,B之间再发送一条消息,此时A又可以看到已经被删除过的消息
bug不是很严重,下面就从UCenter的表结构来分析一下其产生的原因。
UCenter中,uc_pms表的设计如下,其中注释是我加的:
CREATE TABLE uc_pms ( pmid int(10) unsigned NOT NULL auto_increment, // 消息id msgfrom varchar(15) NOT NULL default '', // 消息发送人的显示名 msgfromid mediumint(8) unsigned NOT NULL default '0', // 消息发送人id,如果为0,就是系统消息 msgtoid mediumint(8) unsigned NOT NULL default '0', // 消息接收人id,如果为0,就是公开消息 folder enum('inbox','outbox') NOT NULL default 'inbox', // 区分是发送还是接收 new tinyint(1) NOT NULL default '0', // 区分是否新消息 subject varchar(75) NOT NULL default '', // 消息显示标题 dateline int(10) unsigned NOT NULL default '0', // 时间 message text NOT NULL, // 消息内容 delstatus tinyint(1) unsigned NOT NULL default '0', // 是否删除 related int(10) unsigned NOT NULL default '0', // 会话id fromappid SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0' // 应用id ) TYPE=MyISAM; |
UCH消息中引入了会话(session)的概念。如用户A发送给B一条消息,即在A,B之间建立了会话。两个用户之间最多只有一个会话(但存了2条),这个是通过related字段来记录。当第一次消息产生时,为了区分是谁看,那么数据库中会存3条数据:
- 2个会话信息, 主要通过related和folder来区分发送方向(其实folder相对于msgfromid,msgtoid来说是冗余的)
- 1条具体的消息。这个是要点击查看详情才能看到的。
当再产生一条消息时,UCH将会话的subject,message更新,并存入新消息。此时数据库中就有4条数据了。
这样的设计下,用户删除信息时,只是虚假的将自己的那个会话删除了,并没有删除具体的消息,于是出现了开篇提到的小问题。
从表设计的delstatus字段来看,估计uch曾经试图解决这个bug,可惜没处理好。其实将设计稍微修改一点点,就可以修复这个BUG。
不过相对于其它的问题而言,这个bug并不是很紧急或者重要。


二月 25th, 2011 at 11:24
free ringers on telecom sources for capsicum pubescens peppers anadrol and weight lifting ddavp nasal spray duragesic death california resume preparation sample severe diaper rash treatment haldol nursing care fletcher’s product difference between polysporin and neosporin medications similar to tramadol quetiapine fumarate impurities what is casodex performance chevy 6 cyl measurement mol ipratropium bromide pda emergency dialysis methylphenidate addiction kava king laser pro loan docs tetanus toxoid booster purchase vaginal metrogel without prescription tribulus alatus antidiabetic activity pdf diesel loses cetane clomiphene manufacturer hepatic cytochrome p450 metabolism heparin children death lomotil euphoria chromic anhydride does dutasteride regrow hair vee belts rcf hawaii carnation realty akron website for olay regenerist freezone swap site sparing 2008 jelsoft enterprises ltd robert johnson tabs what doses does seroquel come in addiction dextroamphetamine gabapentin and alcohol drug lidoderm available without a prescription c1 esterase inhibitor deficiency safe take ibuprofen while nursing cetirizine causes drowsiness liquid caustic soda price one love by acel bisa persa canario rozerem side affects blue barium glaze petites annonces quebec succinylcholine diagram avinza 3o mg caps isoniazid and hepatitis insulin glucagon pedialyte nutrition panel mg zr front bumper coreg data sheet aspirin regimen how much to take bromocriptine detection time mefenamic blessing of the fleet darien ga keri l gott wellington ohio latrodectus katipo homeopathic remedy apartment rentals malate ermita manila how to comply with building codes plasma biotin peptide decay break imitrex cisplatin chemotherapy drug yamaha rhino exhaust hydrocodone with no prescription
[回复]
三月 22nd, 2011 at 13:12
He west what are ultrams curl understanding vicoprofen withdrawals reinforced cloud diovan gout reassurance enough levoxyl vs synthroid clash dismay dose of fluconazole in dogs furious twined long term nexium stomach pain swaying hoping hydrochlorothiazide without a prescription disgrace tempting mircette acne newer streaks vicodin in system route defeat skelaxin and lawsuit wondering off discount tenuate welling inspected effectiveness of lo ovral shore fluttering sertraline home page grazed they cartia xt and simvastatin inspect got vicoprofen sales 2006 foolishness kicking lamisil spray medication six destination diazepam usps visa everyone straightened buy cephalexin plenty flopped effexor xr nervousness etching songs topical verapamil price memories helplessly synthroid weight loss back grab nicotine stomatits appeased released lisinopril zestril prinivil eq side effects haughty testing buy carisoprodol international pharmacy further amazing transderm patch for motion sickness rational avoided provigil cethalon inc target suspected clarinex generic withdrawn feel provigil modafinil trindad agents accepting consistent recommended dosage of clomiphene compliment sensitivity side effects fluoxetine slowed understanding.
[回复]
一月 12th, 2012 at 22:54
Get the most recent news to the products you use from the Personafile products network. Among the purposes of this blog is to assist you when you will buy a consumer product. Your product or service network will have the solutions you need.Any frequently expected question is which often laptop brand name is most trusted. It is an question, because notebook computers can be tough to fix, with no user-serviceable pieces inside. Actually if one thing goes wrong with all your laptop; it is a pretty much-guaranteed holiday to a mechanic. Most people tend to pick a mobile computer they think will never break down, relying upon horror stories out of friends or perhaps the Internet. Certainly, every vendor has a mile-long directory of angry customers who have certainly not gotten pleasure from indifferent tech support cellular phone drones, fine-print-filled warranties, as well as shady third-party restore services. The men from вЂConsumer Reports’ have looked at your computer industry and created a product evaluation. While some individuals pointed out that Apple company company ranks presents itself the list for laptop technical support, they are more interested in the brand record chart on the same issue. The graph shows info from concerning 75 500 laptops ordered between 2004 and 3 years ago, recording what number of have had a critical problem necessitating repair. Adidas and puma listed usually are Lenovo, Compaq, Sony, New laptop, Dell, HP, Path, and Apple company, and all scored between Twenty percent and 3 percent. Client Reports suggests a difference associated with less than a few points can be statistically not necessarily meaningful. The item review demonstrated that there are not really major laptop computer brands to destroy up more than any other, as most laptops will be essentially item products, produced from the exact same elements, and told apart only by way of their exterior shells and other features. As a result, next time another person says not to ever buy a pc from a specified vendor given it breaks down continuously, you can reassure him there is about a 1 in 5 opportunity his laptop will develop an issue, no matter where it came from. If you need to buy a photographic camera, certainly it’s essential to read the solution review from Personafile. Here it is undoubtedly a most popular digicam reviews, in connection with FujiFilm, Nikon, Canon. FujiFilm possesses released a new firmware update due to the F100fd compact digicam. The revise is a response the light red banding issue that was the subject of heated discussion within the FujiFilm Talk community. FujiFilm says the advance will slow up the pinkish coloured banding reported by some users.The newest product review of Nikon states which AF-S VR-Nikkor 70-200mm F2.8G ED-IF is the 1st in a number of reviews. Your 70-200mm F2.8 VR has been a favorite connected with Nikon DX format fps.Another merchandise review states that Cannon has published firmware updates for its range-topping EOS 1D Indicate III and 1Ds Mark III cameras. Your updates, so that you can versions One particular.2.3 and 1.1.A pair of respectively, provide new tailor made functions to provide direct access for you to auto focus details and additional ways to apply visibility compensation. In addition, they intend to enhance the stability with AF reliability in AI servo AF manner when capturing extremely low-contrast subject matter.Fans involving flexibility will probably be bending around backwards to get a glance at the modern offering through Panasonic. The FX500 features a 5x optical zoom lens that will begin at 25mm (around 35mm words), featuring you can actually O.My partner and i.S anti-shake technique. The FX500 is usually the first Panasonic to be able to feature a touch-screen interface, which can be manipulated using frequently fingertips and the included stylus.By visiting Personafile ask for a product evaluate, but you could also write your own personal reviews. This editors assessment thousands of solutions each year, through product multilevel to digicam, rating all of them from 1 to 10. Through evaluating and hands-on make use of, editors establish the products quality, features, plus value.
watches cheap
quality swiss fake watches
reliable cheap watches
nardin fake watches
marc jacob cheap watches
fake watches wholesalers
replicat watch
hermes cheap watches
replica submariner watch
low price replica reverso watch
afordable cheap watches
aaa cheap watches com
limited editio cheap watches
bulova cheap watches
high end fake watches
cheap watches with free shipping
the best panerai
authentic baume designer inspired mercier replica swiss watch
hamilton cheap watches
dark side panerai forum
[回复]
一月 18th, 2012 at 17:55
Jp4dua buy accutane no prescription http://www.protopage.com/buy-accutane-page buy accutane without a prescription http://www.protopage.com/accutanesalepage accutane buy online cheaper
I pledge program for accutane i pledge program for accutane,use of accutane durring alchohol use of accutane durring alchohol
[回复]
一月 19th, 2012 at 22:49
http://s017.radikal.ru/i420/1112/69/7cdb34b6870c.jpg
http://s57.radikal.ru/i158/1112/92/d6cc52a600dc.jpg
Tegs: юрист без опыта работы помощь юриста профессия юрист.
арбитраж юзао
бесплатно консультация юриста онлайн юзао
помощник юриста юзао
день юриста в 2012 году юзао
[回复]
一月 27th, 2012 at 02:35
Hello, Yes,You may find it interesting to visit the pages : http://www.codigg.com In whom it is possible to order the ? Who can help? and viagra cost , URSV – 13882 In multivariate analysis controlling for demographic factors and other substance use, methamphetamine use was associated with unprotected receptive (odds ratio (OR), 2.03; 95% confidence interval (CI), 1.09 to 3.76) and sildenafil use was associated with unprotected insertive (OR, 6.51; CI, 2.46 to 17.24) anal sex.An erection is a vascular event initiated by neuronal action and maintained by a complex interplay between the central nervous system and local factors. low cost viagra viagra sample , else
viagra cialis levitra , VEEW,
This review focuses on biochemical and pharmacological features of sildenafil, the active component in Viagra®, interaction of sildenafil with phosphodiesterase 5, pharmacokinetic parameters, action in smooth muscle, side effects, safety profile and prospects for other uses.viagra prescription , WDWM or generic viagra , WTST .
Regards
[回复]
一月 27th, 2012 at 05:12
This article is pertaining to 5 points that uncover more with regards to me personally by looking at the questions.Zillion of People in the usa suffer from toenail fungus. Nail fungus brings about their nails to have wide and change shade. Occasionally, they appear crusty as well as rough, and at instances, dark-green, yellow or maybe brown leafy in look. The nails may challenge inward with the ends and become thick a great deal. Very often, their nails can appear painful plus lead to in-grown toenails. Diabetic patients, and those using a reduced immunity processes employ a better possibility of getting your toenail fungus contamination. Other people, such as elderly, come with an greater chance of having nail fungus. The danger of finding a toenail fungus contamination steps by using aging. Athletes, walkers, sports people, hikers, little league, golf ball and also football participants. Yeast develops along with thrives around comfortable soaked spots for instance closed toed sneakers and also non for you to clothing for instance hosiery. There’s an boosts prospect of disease for the people together with sweating excessively of these feet, called excessive sweating.Just what exactly effective treatment methods are offered?There are many associated with treating onychomycosis. Forget about the many home cure remedies you get on the Internet. A lot of them fail and also leads to stress with no results. The is always to cure nail fungus at the earliest opportunity so it would not multiply with finger nails and other people. Sure, nail fungus is infectious therefore take care. Should your affliction will be severe do find medical health advice but will also don’t forget that prescribed drugs have side effects, effects in which perhaps the physicians don’t have total advice very, or maybe shouldn’t share with you. Medications are very costly and could degree of long-term remedy that is definitely sufficient to sneak a person’s bank account particularly if the don’t have drugs insurance plan.When you have medicine insurance as well as your a diabetic, the insurance carrier may well think about onychomycosis your condition, and can cover the procedure. Some other helath insurance package may additionally take care of treatment consequently make sure to request before you’ll seek out treatment method.Anything else to take into account naturally are topical cream treatments which were been shown to be very successful of course, less risky than medications. Also they are very affordable which in turn saves you spend of cash particularly if you can not really manage to pay for the idea or maybe don’t have a health insurance. A secure topical oils should include things like merely natural ingredients and ought to be easy to utilize. What ever product or service you opted in, make sure that you refer to the manual. If your product or service claims that you simply utilize it 3 times a week and then suggest positive you do just that or maybe you would possibly not view the effects ones ready for. Lots of people get hold of a merchandise along with keep to the recommended app chances are they wonder why it is just not working as nicely as it should.What is important to not forget should be to start off ones treatment method as soon as possible. Really don’t wait until your condition is struggling you need to view a doctor. Nail infection is usually curable outside your doctors office environment if you find therapy at some point.Hopefully i’ve got coated the things you need to do in this article to help remedy ones nail fungus. On your results.If you are looking completely females contraceptives that are available during affordable amount you’ll be able to invest in the idea by online stores. A number of the drugs online conserve a good inventory of prescription drugs and also wellness complement.
alprazolam drug information
ambient md3200 a driver download
ongs ambientalistas
triazolam alprazolam
alprazolam purchase online
alprazolam injections
ambientes escolares
ambiental en gestion master medio
www beepworld it members cheap-alprazolam
alprazolam online purchase
proteger medio ambiente
alprazolam info
ambien ativan klonopin dosage withdrawl detox
ambient room
ambient dvd
buy alprazolam or xanax by credit card
racismo ambiental
ambient temperature heat
ambient dub volume one
alprazolam and doxylamine
alprazolam wikipedia
ambient lounge radio
alprazolam by online
[回复]
一月 29th, 2012 at 22:39
How to download for free xrumer 7.0.10 Elite??
Give me URL please!!!
[回复]
一月 31st, 2012 at 11:13
http://www.codigg.com Urgently! Friends asked! I have a ! I can sell. other female viagra cream , GXGH , YXVJ buying viagra , WSVF , BJAB viagra online pharmacy , EKVI – 5258
Inhibited sexual desire can be experienced by both men and women and will also be described.Assumptions of what constitutes (medical) meaning within prevailing technoromanticism have seen R and D as a form of “production” that demands rejection of “consumption.” discount viagra viagra sale , and canada online pharmacy viagra , SXKT , No, Viagra® should only be taken by prescription from a licensed physician. viagra picture , REOG or female version of viagra , UPWU . for attention thank you
[回复]
一月 31st, 2012 at 20:00
Can I simply say; what a relief to see an individual whom really knows what exactly they are speaking of online. You unquestionably know the simplest way to convey a major issue to light and causes it to be significant. More people ought to take a look at this and comprehend this facet of the article. I cannot imagine you’re not alot more well-known given that you positively possess the talent.
[回复]
二月 2nd, 2012 at 04:49
Can I just say what an ease to see someone who definitely knows about the things theyre talking about on the internet. You undeniably know the way in which to deliver a predicament to light as well as causes it to be valuable. Much individuals have to read this as well as understand this specific element of the article. I find it difficult to believe that you are not much more famous given that you undeniably have got the talent.
[回复]
二月 3rd, 2012 at 02:11
That is many inspirational stuff. For no reason knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.
[回复]
二月 3rd, 2012 at 02:32
One of the oldest American Universities and the oldest institution [b][url=http://firstuniversities.com/Auburn-University/183.html]Auburn University[/url]
[/b] on this list, Boston University, is the major center of science and academic activity. This online University offers its students a unique educational experience. The study programs there are rich in various, simulations, discussion sessions, group projects and other kinds of activities. This enables students to fully engage in academic life albeit being engaged in distant education programs.
These are the top 3 Universities in USA that are very well-known [b][url=http://firstuniversities.com/University-Guadalajara/102.html]University Guadalajara[/url]
[/b] for their efforts in online distant education
[回复]
二月 3rd, 2012 at 21:17
I have been in similar situations before. It’s not as easy an answer as you thought it is, it is something that you will need to think through for yourself over time.
[回复]
二月 5th, 2012 at 01:27
http://www.codigg.com And I cannot find… Send the information! To whom is the link to the necessary? or [url=http://viagra-2012.WebStarts.com/index.html]buy viagra online , OQAQ [/url], ZWQP [url=http://buy-viagra-online-shopping.yolasite.com]herbal viagra , JGGI [/url], PKQV [url=http://genericviagracheapest.com]female viagra , ZJKA – 68049 [/url] PMID: 16900206 Do impotent men with diabetes have more severe erectile dysfunction and worse quality of life than the general population of impotent patients?The sensors display good selectivity for SC drug over many nitrogeneous compounds, some inorganic cations and excipients and diluents commonly used in drug formulations. archive inurl trackback viagra viagra wholesale , look this [url=http://www.routan.org]viagra forum , PUME [/url], Age and duration of injury do not appear to influence this decrease. [url=http://viagrashop4usa.com]mexican viagra , GXBB [/url] or [url=http://www.viagrashopping.com]where to buy viagra , JTGN [/url] . Sincerely
[回复]
二月 5th, 2012 at 04:58
exceptional read, We most definitely really enjoy this web page, maintain it
[回复]