Duplicate accounting log entries



Hi guys,

Hope someone can help, as this has me banging my head on the wall :]

I am getting duplicate updates from my NAS, and Im trying to figure out how to prevent them from being written to my accounting logs table. I unfortunately have absolutely no control over the NAS, so thats not even an option.

What I want to do is make the acct_session_id or acct_unique_id fields unique, or even make a composite key of them both, but I have found entries in my table where the following happens:

This scenario is with DSL accounts:

I have 3 records for 3 different users all with the same acct_session_id. 2 of these records have the same acct_unique_id, and the 3rd has a different acct_unique_id. Everything else in the records is identical.

If I make a composite key combining the session and unique id's I will get rid 1 of the 2 records that have the same unique id, but I will still be sitting with 2 duplicate entries, each with a different unique id. I then thought to make the acct_session_id unique, which would solve the above scenario, but then I came across another problem.

This scenario deals with dialup accounts:

I have 2 records with the same acct_session_id but they are for 2 different users. Each record has a different acct_unique_id though. So if I make a composite key combining the session and unique id's both these records will exist, which is correct as they are for 2 different users. If I make only the acct_session_id unique to solve the DSL problem above, then one of these records wont be inserted, and an update will occur instead, as per the alternate accounting query.

Am I missing something? Is there any other way to do this? I do not know why I am getting duplicate acct_session_id's from my NAS, but as I said there is no way for me to go that route...

Any help or guidance would REALLY be appreciated!

Thanks
Patrick




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.