Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat (service): re-enable counts from index #216

Open
SHAcollision opened this issue Nov 21, 2024 · 0 comments · May be fixed by #226
Open

Feat (service): re-enable counts from index #216

SHAcollision opened this issue Nov 21, 2024 · 0 comments · May be fixed by #226
Labels
bug Something isn't working 🔮 nexus 🌐 service

Comments

@SHAcollision
Copy link
Collaborator

We disabled serving UserCounts and PostCounts from index as the numbers were drifting from real time graph queries over time. We should aim to re-enable:

  • Make sure that both counts (index and graph) stay align in staging.
  • Make sure tagged counts mean the same in index and graph (feels like one counts total counts and the other one is distinct counts.

These are the two disabled regions

// TODO: uncomment the get_from_index approach when index counting is stable
// match Self::get_from_index(author_id, post_id).await? {
// Some(counts) => Ok(Some(counts)),
// None => {
// let graph_response = Self::get_from_graph(author_id, post_id).await?;
// if let Some((post_counts, is_reply)) = graph_response {
// post_counts
// .put_to_index(author_id, post_id, !is_reply)
// .await?;
// return Ok(Some(post_counts));
// }
// Ok(None)
// }
// }

// TODO: uncomment the get_from_index approach when index counting is stable
// match Self::get_from_index(user_id).await? {
// Some(counts) => Ok(Some(counts)),
// None => {
// let graph_response = Self::get_from_graph(user_id).await?;
// if let Some(user_counts) = graph_response {
// user_counts.put_to_index(user_id).await?;
// return Ok(Some(user_counts));
// }
// Ok(None)
// }
// }

@SHAcollision SHAcollision added bug Something isn't working 🔮 nexus 🌐 service labels Nov 21, 2024
@SHAcollision SHAcollision linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🔮 nexus 🌐 service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant