Problem-List of concerns and fan list display is unstable

Source: Internet
Author: User

Function Description: Green Tags: concerns, blue Tags: mutual attention, Red Label: not concerned about

1. Questions

(1) To open my watchlist, which should appear in the green or blue label, but sometimes there will be red tags, click on the user, found to have been concerned about the status.

(2) I am A, I focus on B, then I open B's watchlist, I found a list of B's watchlist, showing that there are a lot of people I have been concerned about, but in fact, I did not pay attention.

2. Troubleshoot problems

(1) Check the code to find the list of concerns, first based on the user's snsid from the memcache to remove the entity, if the entity is not empty, put the bean into the list, and then continue to loop.

(2) If the 1-minute cache does not exist, check it out from Redis and determine if it is my concern

(2) There is a hidden problem in this case. If C is concerned about the B,c brush over the list, then the B will be stored in 1 minutes cache, and B's status is already concerned, (green label).

In this case, D goes to Brush C's watchlist, gets to B's snsid, and then finds the entity of B from Memcache, puts it in the list, and then loops. So the problem is, because C is in the brush list.

The entity of B, and the status of B is a green label, then the D brush list, regardless of whether D has paid attention to the results of b,d brush out is already concerned.

3. Solution

Once the entities are isolated from the 1-minute cache, isfollowed and isfollowing are assigned to ensure real-time visibility and attention.

Problem-List of concerns and fan list display is unstable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.