mikeizbicki/cmc-csci143

lab- same issue as in-person lab

Closed this issue · 1 comments

after redoing the lab, I still run into the issue that it shows 0 transaction instead of something around 1500.

postgres=# SELECT count(*) FROM transactions
;
 count 
-------
     0
(1 row)

I noticed that when I run the chaosmonkey_parallel script, the error below occured.

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

scripts/chaosmonkey_parallel.sh: 23: kill: No such process

The below is the lock I've added to the Ledger/__init__.py file

with self.connection.begin():
            # lock the balances table
            sql = f'LOCK TABLE balances IN EXCLUSIVE MDOE'
            logging.debug(sql)
            self.connection.execute(sql)

please let me know if there's anything wrong with my approach to the lock

this is resolved