YottaDB / YDB

Mirrored from https://gitlab.com/YottaDB/DB/YDB
Other
76 stars 37 forks source link

WRITE /WAIT on a SOCKET device with no sockets spin loops (i.e. 100% CPU) #280

Closed nars1 closed 6 years ago

nars1 commented 6 years ago

Final Release Note

Description

Below is a test case that demonstrates the spin loop.

> cat soc.m
        set s="soc"
        open s:::"SOCKET"
        use s
        write /wait
        quit
> mumps -run soc

The above command never returns and htop shows 100% CPU utilization. Since the SOCKET device has no listening or connected sockets, the WRITE /WAIT should have returned immediately.

Draft Release Note

WRITE /WAIT on a SOCKET device with no sockets returns immediately. Previously it would spin loop (i.e. use the CPU at 100%) until the command timed out.