Merge lp:~tjoneslo/akiban-server/add-user-monitor into lp:~akiban-technologies/akiban-server/trunk
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 2644 |
Merged at revision: | 2646 |
Proposed branch: | lp:~tjoneslo/akiban-server/add-user-monitor |
Merge into: | lp:~akiban-technologies/akiban-server/trunk |
Diff against target: |
432 lines (+233/-3) 10 files modified
src/main/java/com/akiban/server/service/is/ServerSchemaTablesServiceImpl.java (+60/-0) src/main/java/com/akiban/server/service/monitor/MonitorService.java (+18/-0) src/main/java/com/akiban/server/service/monitor/MonitorServiceImpl.java (+41/-1) src/main/java/com/akiban/server/service/monitor/SessionMonitor.java (+3/-0) src/main/java/com/akiban/server/service/monitor/SessionMonitorBase.java (+12/-0) src/main/java/com/akiban/server/service/monitor/UserMonitor.java (+32/-0) src/main/java/com/akiban/server/service/security/SecurityServiceImpl.java (+13/-1) src/main/java/com/akiban/server/service/security/UserMonitorImpl.java (+51/-0) src/main/java/com/akiban/sql/pg/PostgresServerConnection.java (+1/-0) src/test/java/com/akiban/server/service/is/SchemaTableServiceIT.java (+2/-1) |
To merge this branch: | bzr merge lp:~tjoneslo/akiban-server/add-user-monitor |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Thomas Jones-Low | Needs Resubmitting | ||
Review via email: mp+161017@code.launchpad.net |
Description of the change
Add a UserMonitor with IS.SERVER_USERS to show how much work each user is doing.
This creates a UserMonitor which is registered with the MontitorService and attached to the SessionMonitor when the user logs in. Currently this only works on the Postgres and InternalJDBC connections. If not using password or SSL security (i.e, security is none) there are no UserMonitors created.
This is mostly infrastructure. The only thing the UserMonitor counts currently is number of SQL statements executed. This can easily be extended, and will be at a later time.
This includes a new I_S.SERVER_USERS table to display the data gathered by the UserMonitor to the user. This table is sensitive to the restricted access security that the SERVER_SESSIONS (and other) tables are.
Tiny nit. Diff line 170 can just remove, instead of contains and remove. The string based contract being looser (i.e. not asserting) is fine though.
I'm not sure we'll want to blow away the monitor, diff line 322, if a user is deleted in general. Long term random guess: they still need billed. But I'm hand waving and we can always adjust as we figure out how we want to use it.