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
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...