- add possibility to pass custom Error-Message AVP to negative diameter
answers
- negative answer is now built only when an error occurs
- remove tests that were testing behaviour with max concurrent requests 0
- Ping methods defined by engine.NewService for all services
- Call methods were previously replaced by the centralized call method
(on *birpc.Service) for all components
- All services now register V1/V2 objects from apier package for
consistency
Previously, the timestamp was accurate only down to seconds. For smaller intervals,
this would truncate the previous file(s). Now, for small intervals, the number of
microseconds is appended to the file name.
Added the possibility to disable timestamps in the memory profile file names and use
increments of 1 instead.
Updated the memory profiling integration tests.
Would previously happen if memory profiling was already started.
Now using os.File.Stat beforehand to check if a handler of the file
is already active and confirm the status of profiling. This required
changing the type of the reference fileCPU from io.Closer to *os.File.
Asserting the type would have worked as well.
- merge StopChanMemProf with StopMemoryProfiling
- remove fileMEM and stopMemProf from struct and constructors
- add separate mutex for memory profiling, ensure thread safety
- handle all significant errors
- log error if StopMemoryProfiling fails during CoreS Shutdown
- ignore errors if profiling inactive in Shutdown and deferred Stop
- move validations inside V1 functions
- return error if StartMemoryProfiling already started
- return error if StopMemoryProfiling already stopped or never started
- close profiling loop on error, not the cgr-engine
- StopMemoryProfiling closes channel and profiling loop writes final profile
- rename Path to DirPath for mandatory field error
- rename memprof_nrfiles flag to memprof_maxfiles
- increase default memprof_interval
- consider MaxFiles <= 0 as unlimited
- move memory profiling logic after starting services
- use CoreService Start/StopMemoryProfiling in main
- remove final memory profile block (created by deferred Stop)
- convert MemProfiling to method on CoreService and rename to profileMemory
- use Ticker for recurrent actions instead of Timer
- compute mem_final.prof full path in StartMemoryProfiling
- suffix profile files with current time instead of numbers
- update dispatcher methods after changes
- move MemoryPrf from utils to cores, rename to MemoryProfilingParams
- add logs for starting/stopping profiling
cgr-engine.go:
- use filepath.Join instead of path.Join
- handle *CoreService.StopCPUProfiling error inside deferred function
- same with the error from *os.File.Close()
cores/core.go:
- StartCPUProfile now returns an io.Closer (as opposed to an io.WriteCloser)
- handle pprof.StartCPUProfile error and ensure file is closed before returning
- log file close error as a warning if it occurs
- return missing mandatory error with correct path field name ('DirPath')
- no need to check if fileCPU is nil for profiling status
- pprof.StartCPUProfiling will return an error if profiling is already started
- os.File.Close() will return ErrClosed if profiling is already stopped
- differentiate between calling StopCPUProfiling when profiling hasn't started
and when it was already stopped by returning appropriate errors
- improved comments and error messages
- hardcode the base path for profiling endpoints to '/debug/pprof/'
- change profiling flag 'httprof_path' to boolean 'http_pprof'
(because of the above)
- remove redundant profiling endpoint registrations (handled by pprof.Index)
- move profiling registration log after actual registration
- make profiling registration log more descriptive
- use utils.Logger instead of log.Print for the log mentioned above
- refactor flags test into a table test (adding also verification for default
flag values)
- change 'scheduledShutdown' flag type from string to time.Duration (to avoid
unnecessary time parsing)
- revise flags usage descriptions
- rename flag 'singlecpu' to 'singleCPU'
- switch to 'ExitOnError' for flag parsing to simplify error handling and
automatically handle 'ErrHelp' by exiting with status 0 when help is
requested and status 2 for other parsing errors. Before the following error
log would have been received:
'<InitS> error received: <flag: help requested>, exiting!'
- update cgr-engine documentation
-update cached filter indexes count
-add the flaky constraint to a couple more tests
-fix unstable cores integration test
-fix unstable filterindexes integration test
The rpcclient constructor could not see the centralized
Encoding flag because it didn't have the necessary build
constraints. Added the constraints in lib_test.go files
where it wasn't alone. In all the other cases, it was
moved to the first file where it was needed.
Will accept utils.CGREvent instead of utils.AttrDisconnectSession as a
parameter.
SessionSv1.ForceDisconnect will take utils.SessionFilterWithEvent as a
parameter instead of *utils.SessionFilter.
Added possibility to pass DisconnectCause as an Event parameter.
The forceSTerminate that's called when the session timer expires will
have DisconnectCause 'SESSION_TIMEOUT' instead of 'FORCED_DISCONNECT'.
Added Dispatcher methods for AlterSessions.
Event will be merged with EventStart of the session before being sent to
AgentV1DisconnectSession.
Will now support two extra parameters: address and codec. For *internal
connections, the birpc.Service object will be retrieved from rpcParamsMap
from utils. Supported codecs: <*gob|*json|*http_jsonrpc> (ingored for
*internal address).
Action does not bother with setting defaults anymore, lets the API
handle them.
Improve action comments.
Add unit tests for the action. UnregisterRpcParams' implementation was
required.
Updated *alter_sessions action tariffplan for radius coa integration test
to include address and codec.
Some birpc clients that are set up in integration tests were still registering
a SessionSv1 object. Updated them to register an AgentV1 object instead.