I have attached the code snippet which gives me an error saying index not found in appwrite cloud.
I have added all the index
This is the error I'm getting
Can you try creating one index with both those attributes?
Yes it worked. Thanks
Also
I'm using a cloud function for match making
This is my approach:
- User A creates a request which will add a document into requests collection
- If User B with same language requests, then I am quering the requests collection to get the oldest request by any user which in this case is User A and then deleting both A and B's request
- Add a document in active-pairs collection
Will this lead to any inconsistency in production ?
Ya you could run into a race condition if multiple requests happen at the same time
Okayy. Is there any better approach for the same ?
Certainly, here's a concise version of the considerations for your matchmaking approach:
- Concurrency: Address potential issues with multiple requests happening at once by using atomic operations provided by your database or cloud platform.
- Error Handling: Implement robust error handling to manage failures during matchmaking and data updates.
- Data Integrity: Ensure consistent data by preventing orphaned or incomplete documents in your collections.
- Scalability: Ensure your approach can handle growing numbers of users and requests without performance issues.
- Testing and Monitoring: Thoroughly test your approach and set up monitoring to detect anomalies or inconsistencies.
- Backup and Recovery: Have a plan for data backup and recovery in case of data corruption.
- Security: Safeguard user data and adhere to data protection regulations.
- Feedback Loop: Gather user feedback and monitor system performance to make improvements as needed.
- Consider Alternatives: Explore other methods like using queues for more controlled and scalable matchmaking.
Balancing these considerations will help you maintain a consistent and stable matchmaking system in production.
gpt answer
[SOLVED] Index not found - $id, $createdAt, languageIso
Thanks @longline but I want something on appwrite terms.
I have added a new support post. Please look into it @Steven
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...