hezean / sustc

Template for project 2 of SUSTech Principles of Database Systems (CS307 / CS213), 23 fall semester.
http://172.18.34.154
MIT License
22 stars 10 forks source link

[DanmuService.sendDanmu Benchmark] Count discrepancy #104

Closed Jaredanwolfgang closed 10 months ago

Jaredanwolfgang commented 10 months ago

Related module

Benchmark

What happened

I have implemented sendDanmu method in PostgreSQL and use preparedstatement to connect execute this sql. However, in sendDanmu I have added a sout to print the returning result.

image

In this case, I have get in total 1016 records.

image

However if I get all the log in benchmark I can only get 543 records and the final counts are 543 records.

image

The total number of inserted danmus are 832 (if adding the 184 invalid records the total will be 1016, which is correct), this means that the function I used can actually insert data.

image

What you expected to happen

There are not residual logic between return danmu in sendDanmu and Benchmark res, so it should get the same results. But the log in benchmark can only return parts of my danmu_ids and I cannot seem to find any clue on what will benchmark res will return, but the total count is always 543. (Additionally, no debug is logged...)

image

How to reproduce

No response

Anything else

On the OJ benchmark the result is the same: 543... So the benchmark service I used is the same with OJ. Maybe there are problems with my code, but I cannot find out the reason... I have implemented over other methods, and it will be okay for id:3-9 methods..