TWSD-929 - User should be able to query VA instance with type
Review Request #971 — Created July 16, 2025 and submitted — Latest diff uploaded
| Information | |
|---|---|
| shuinvy | |
| AVX2 | |
| rel_avx_2_7_4 | |
| TWSD-929 | |
| Reviewers | |
| jasonchang, kevin.poh, marychou, timlai, timsu, weikai | |
Fixed different result of API for different quey string
The root cause is there is no difference of the original result that used session counter mechanism based on different query string.
What I think I can do is add query type layer to our architecture.
To do so, my code change is:
1. Add attribute called "query_type" for API (Manager class) to check user's query string(ajax.py).
2. In _get_query_set for the API, get the attribute and add the query_type parameter to the SessionCounter constructor(init.py).
3. Add query_type to SessionCounter constructor, then check type_id.
If type_id exists, then get data by existed type_id,
otherwise create new type_id and add query mapping.
4. Change direcory architecture with type_id
5. Add functions for type_id operation
6. Because the query string maybe in different format,
I use function normalize_query_type to change all query string to same format.I also add attachment for reference:
The first picture is for the directory changes schematic diagram
The second picture is for the flowchart of Session Counter Machanism, and the yellow diagram is what I added/modified in this time.
