<commit_before>package gocassos

import (
	"bytes"
	"time"

	"github.com/gocql/gocql"
)

func (o *Object) Remove() {
	o.cfg.in_progress.Add(1)
	NVM.Printf("REMOVE: Removing %s", o.id)
	go o.async_remove()
	return
}<commit_msg>Check for forbidden updates on removal as well<commit_after>package gocassos

import (
	"bytes"
	"time"

	"github.com/gocql/gocql"
)

func (o *Object) Remove() error {
	if !o.cfg.AllowUpdates {
		FYI.Printf("[%s] PUSH: Refusing to delete object %s (%0.3fs lookup)", o.ClientId, o.id, o.LookupTime.Seconds())
		return ErrRefused
	}
	o.cfg.in_progress.Add(1)
	NVM.Printf("REMOVE: Removing %s", o.id)
	go o.async_remove()
	return nil
}
{'fraction_non_alphanumeric': 0.1580547112462006, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 4.401639344262295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '459203', 'n_tokens_mistral': 284, 'n_tokens_neox': 280, 'n_words': 61}