IITGN-CS431 / project-cns

1 stars 27 forks source link

Functionality Bug: Group 12, logread command working for a few log entries but when this number increases logread doesn't output anything #315

Open cpatel321 opened 4 days ago

cpatel321 commented 4 days ago

Please find the video of the demonstration.

Also these are the commands used to logappend,

./logappend -T 1 -K token123 -E Alice -A log
./logappend -T 2 -K token123 -E Bob -A log

./logread -K token123 -S log  # ignore the wrong key put here in the video, 

./logappend -T 3 -K token123 -E Alice -A -R 101 log
./logappend -T 4 -K token123 -E Bob -A -R 102 log
./logappend -T 5 -K token123 -E Alice -L -R 101 log
./logappend -T 6 -K token123 -E Bob -L -R 102 log
./logappend -T 7 -K token123 -E Alice -L log
./logappend -T 8 -K token123 -E Bob -L log
./logappend -T 9 -K token123 -G Charlie -A log
./logappend -T 10 -K token123 -G Dana -A log
./logappend -T 11 -K token123 -G Charlie -A -R 201 log
./logappend -T 12 -K token123 -G Dana -A -R 202 log
./logappend -T 13 -K token123 -G Charlie -L -R 201 log
./logappend -T 14 -K token123 -G Dana -L -R 202 log
./logappend -T 15 -K token123 -G Charlie -L log
./logappend -T 16 -K token123 -G Dana -L log
./logappend -T 17 -K token123 -E Eve -A log
./logappend -T 18 -K token123 -E Eve -A -R 301 log
./logappend -T 19 -K token123 -E Eve -L -R 301 log
./logappend -T 20 -K token123 -E Eve -L log
./logappend -T 21 -K token123 -G Frank -A log
./logappend -T 22 -K token123 -G Frank -A -R 401 log
./logappend -T 23 -K token123 -G Frank -L -R 401 log
./logappend -T 24 -K token123 -G Frank -L log
./logappend -T 25 -K token123 -E George -A log
./logappend -T 26 -K token123 -E Helen -A log
./logappend -T 27 -K token123 -E George -A -R 501 log
./logappend -T 28 -K token123 -E Helen -A -R 502 log
./logappend -T 29 -K token123 -E George -L -R 501 log
./logappend -T 30 -K token123 -E Helen -L -R 502 log
./logappend -T 31 -K token123 -E George -L log
./logappend -T 32 -K token123 -E Helen -L log
./logappend -T 33 -K token123 -G Ian -A log
./logappend -T 34 -K token123 -G Judy -A log
./logappend -T 35 -K token123 -G Ian -A -R 601 log
./logappend -T 36 -K token123 -G Judy -A -R 602 log
./logappend -T 37 -K token123 -G Ian -L -R 601 log
./logappend -T 38 -K token123 -G Judy -L -R 602 log
./logappend -T 39 -K token123 -G Ian -L log
./logappend -T 40 -K token123 -G Judy -L log
./logappend -T 41 -K token123 -E Kevin -A log
./logappend -T 42 -K token123 -E Kevin -A -R 701 log
./logappend -T 43 -K token123 -E Kevin -L -R 701 log
./logappend -T 44 -K token123 -E Kevin -L log
./logappend -T 45 -K token123 -G Laura -A log
./logappend -T 46 -K token123 -G Laura -A -R 801 log
./logappend -T 47 -K token123 -G Laura -L -R 801 log
./logappend -T 48 -K token123 -G Laura -L log
./logappend -T 49 -K token123 -E Mike -A log
./logappend -T 50 -K token123 -E Mike -A -R 901 log
./logappend -T 51 -K token123 -E Mike -L -R 901 log
./logappend -T 52 -K token123 -E Mike -L log
./logappend -T 53 -K token123 -G Nina -A log
./logappend -T 54 -K token123 -G Nina -A -R 1001 log
./logappend -T 55 -K token123 -G Nina -L -R 1001 log
./logappend -T 56 -K token123 -G Nina -L log
./logappend -T 57 -K token123 -E Owen -A log
./logappend -T 58 -K token123 -E Owen -A -R 1101 log
./logappend -T 59 -K token123 -E Owen -L -R 1101 log
./logappend -T 60 -K token123 -E Owen -L log
./logappend -T 61 -K token123 -G Paula -A log
./logappend -T 62 -K token123 -G Paula -A -R 1201 log
./logappend -T 63 -K token123 -G Paula -L -R 1201 log
./logappend -T 64 -K token123 -G Paula -L log
./logappend -T 65 -K token123 -E Quinn -A log
./logappend -T 66 -K token123 -E Quinn -L log
./logappend -T 67 -K token123 -G Rachel -A log
./logappend -T 68 -K token123 -G Rachel -L log
./logappend -T 69 -K token123 -E Steve -A log
./logappend -T 70 -K token123 -E Steve -A -R 1301 log
./logappend -T 71 -K token123 -E Steve -L -R 1301 log
./logappend -T 72 -K token123 -E Steve -L log
./logappend -T 73 -K token123 -G Tara -A log
./logappend -T 74 -K token123 -G Tara -A -R 1401 log
./logappend -T 75 -K token123 -G Tara -L -R 1401 log
./logappend -T 76 -K token123 -G Tara -L log

And these are the output

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logappend -T 1 -K token123 -E Alice -A log
Message sent
4
Successfully_executed

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logappend -T 2 -K token123 -E Bob -A log
Message sent
4
Successfully_executed

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logread -K 123 -S log
Message sent
3
key
Invalid

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logread -K token123 -S log
Message sent
5
Alice,Bob

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logappend -T 3 -K token123 -E Alice -A -R 101 log
./logappend -T 4 -K token123 -E Bob -A -R 102 log
./logappend -T 5 -K token123 -E Alice -L -R 101 log
./logappend -T 6 -K token123 -E Bob -L -R 102 log
./logappend -T 7 -K token123 -E Alice -L log
./logappend -T 8 -K token123 -E Bob -L log
./logappend -T 9 -K token123 -G Charlie -A log
./logappend -T 10 -K token123 -G Dana -A log
./logappend -T 76 -K token123 -G Tara -L log1401 loggg        <--- Somehow pasted commands here merged in terminal, but they executed, can be verified by video.
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ ./logread -K token123 -S log
Message sent
5

┌──(akon㉿Fugaku)-[~/Desktop/project-cns/project-submissions/group-12/build]
└─$ No response, even first 2 persons are not visible 

The expected output would be to print all the persons present there room wise.

it is not that the log are not saved, this is the snapshot of the log file {8A109232-EA1A-4C8C-8493-2E2D0CABFB5A} It has exactly 76 entries as expected.

chakrie1489 commented 3 days ago

@bichhawat @cpatel321 In your logappend input, all the individuals who entered the campus eventually left, leaving no one on campus. As a result, the logread command for listing current state of the campus produces an empty output. However, other logread features continue to function correctly. For reference, I am attaching the logread commands I executed with the same input: The logread commands can be found at the end.

pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logappend -T 1 -K token123 -E Alice -A log
./logappend -T 2 -K token123 -E Bob -A log
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logappend -T 3 -K token123 -E Alice -A -R 101 log
./logappend -T 4 -K token123 -E Bob -A -R 102 log
./logappend -T 5 -K token123 -E Alice -L -R 101 log
./logappend -T 6 -K token123 -E Bob -L -R 102 log
./logappend -T 7 -K token123 -E Alice -L log
./logappend -T 8 -K token123 -E Bob -L log
./logappend -T 9 -K token123 -G Charlie -A log
./logappend -T 10 -K token123 -G Dana -A log
./logappend -T 11 -K token123 -G Charlie -A -R 201 log
./logappend -T 12 -K token123 -G Dana -A -R 202 log
./logappend -T 13 -K token123 -G Charlie -L -R 201 log
./logappend -T 14 -K token123 -G Dana -L -R 202 log
./logappend -T 15 -K token123 -G Charlie -L log
./logappend -T 21 -K token123 -G Frank -A log1 log
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logappend -T 22 -K token123 -G Frank -A -R 401 log
./logappend -T 23 -K token123 -G Frank -L -R 401 log
./logappend -T 24 -K token123 -G Frank -L log
./logappend -T 25 -K token123 -E George -A log
./logappend -T 26 -K token123 -E Helen -A log
./logappend -T 27 -K token123 -E George -A -R 501 log
./logappend -T 28 -K token123 -E Helen -A -R 502 log
./logappend -T 29 -K token123 -E George -L -R 501 log
./logappend -T 30 -K token123 -E Helen -L -R 502 log
./logappend -T 31 -K token123 -E George -L log
./logappend -T 32 -K token123 -E Helen -L log
./logappend -T 33 -K token123 -G Ian -A log
./logappend -T 34 -K token123 -G Judy -A log
./logappend -T 53 -K token123 -G Nina -A log901 logg
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logappend -T 54 -K token123 -G Nina -A -R 1001 log
./logappend -T 55 -K token123 -G Nina -L -R 1001 log
./logappend -T 56 -K token123 -G Nina -L log
./logappend -T 57 -K token123 -E Owen -A log
./logappend -T 58 -K token123 -E Owen -A -R 1101 log
./logappend -T 59 -K token123 -E Owen -L -R 1101 log
./logappend -T 60 -K token123 -E Owen -L log
./logappend -T 61 -K token123 -G Paula -A log
./logappend -T 62 -K token123 -G Paula -A -R 1201 log
./logappend -T 63 -K token123 -G Paula -L -R 1201 log
./logappend -T 64 -K token123 -G Paula -L log
./logappend -T 65 -K token123 -E Quinn -A log
./logappend -T 66 -K token123 -E Quinn -L log
./logappend -T 76 -K token123 -G Tara -L log1401 logg
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
Message sent
4
Successfully_executed
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -K token123 -S log
Message sent
5
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -T -E Alice -K token123 log
Message sent
4
6       <-- Total time spent by Alice in campus
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -T -E Bob -K token123 log
Message sent
4
6       <-- Total time spent by Bob in campus
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -T -G Dana -K token123 log
Message sent
4
6       <-- Total time spent by Dana in campus
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -T -E Eve -K token123 log
Message sent
3
3       <-- Total time spent by Eve in campus
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -R -E Alice -K token123 log
Message sent
4          
101     <-- Output 
pakambo@Quagrinn:~/Documents/Security_Guard/build$ ./logread -R -G Dana -K token123 log
Message sent
5           
202     <-- Output