Open Smuzzy-waiii opened 4 weeks ago
Hi @Smuzzy-waiii, could I be assigned this bug?
@JP-sDEV This repo is being prepped for a university club event called Hacknight where participants get to solve issues on FOSS repo's to get points. You can find out more about hacknight on the ACM PESU ECC instagram here. The event is from 4PM IST on Fri, 18th Oct to 12PM IST on Sat, 19th Oct.
If this issue is still unresolved at the end of the event, I would love to assign it to you
No worries, thanks!
could i be assigned?? @Smuzzy-waiii
!assign @velukutty2194
The bot will deassign you in 45mins. If you need more time, show your progress and I can extend the time. Please feel free to text/call me at 8618950413
Hey @Smuzzy-waiii! The timer for the @velukutty2194 to work on the issue has finished, deassign and assign a new contributor or extend the current timer. Contact maintainer leads if inactive @DedLad @polarhive @achyuthcodes30
@velukutty2194 Are you still working on this?
!extend
!deassign
@JP-sDEV Are you still interested in working on this? I can assign you
@Smuzzy-waiii Yes, I am still interested! I will start working on it on Monday, if assigned.
@JP-sDEV Yes np go for it! 😃
The
RemoveEgde
function throws "Key not found" error while trying to remove an edgea->b
if there exist no edges witha
as their source. This is happening due to the following code:where we are not checking if the error returned by badger is
ErrKeyNotFound
as is being done for theAddEdge
functionModify the
RemoveEdge
function to return(bool, error)
instead of just aerror
wherebool
signifies whether the Remove actually removed an edge or whether it silently failed because the edge didn't exist. Have the function return:true, nil
on successful removal of an edge that existsfalse, nil
if the edge doesn't existfalse, error
if there is any errorNote that you will have to check for the edge not existing is 2 places: while getting the edgelist for the src node from badger, and then again in the edgelist before calling
delete(dstNodes, to)
You are also required to add a unit test to cover this case
The above change is a breaking change to the
RemoveEdge
API. Make sure to edit all the calls toRemoveEdge
inlib_test.go
to reflect thatpsst, remember to update the usage guide in the README too 👀