Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
d9bcbc88
Commit
d9bcbc88
authored
Oct 6, 1992
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Added a comment that describes a better way to implement garbage colletion
of texts.
parent
58bba71a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/server/ChangeLog
+5
-0
5 additions, 0 deletions
src/server/ChangeLog
src/server/text-garb.c
+34
-2
34 additions, 2 deletions
src/server/text-garb.c
with
39 additions
and
2 deletions
src/server/ChangeLog
+
5
−
0
View file @
d9bcbc88
Wed Oct 7 00:43:03 1992 Per Cederqvist (ceder@mauritz)
* text-garb.c: Added a comment that describes a design for a
better way to implement garbage collection of texts.
Sun Sep 6 20:30:01 1992 Per Cederqvist (ceder@robert)
* version.incl: Version 1.2.5.
...
...
This diff is collapsed.
Click to expand it.
src/server/text-garb.c
+
34
−
2
View file @
d9bcbc88
/*
* $Id: text-garb.c,v 0.
6
1992/
02/26 18:44:57
ceder Exp $
* $Id: text-garb.c,v 0.
7
1992/
10/06 23:45:00
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -28,7 +28,7 @@
* Author: Per Cederqvist.
*/
static
char
*
rcsid
=
"$Id: text-garb.c,v 0.
6
1992/
02/26 18:44:57
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: text-garb.c,v 0.
7
1992/
10/06 23:45:00
ceder Exp $"
;
#include
<time.h>
...
...
@@ -40,6 +40,38 @@ static char *rcsid = "$Id: text-garb.c,v 0.6 1992/02/26 18:44:57 ceder Exp $";
#include
"text-garb.h"
#include
<debug.h>
/*
* This comment is a description of how this _could_ be done in a more
* efficient way. It is not yet implemented. Design by Inge Wallin
* and Per Cederqvist 1992-10-07.
*
* Today, all text statuses are read into the core during the garbage
* collection phase. Due to step 3 below we think that we can reduce
* the number of text-status-fetches by 95 %.
*
* 1) Allocate a bitmap with one bit for each text. Clear all bits.
* This bit is set as soon as it is certain that this text should
* not be deleted during this garbage collection pass.
* 2) Loop over all persons:
* + Set the bit for all his/her marked texts.
* (This step may, or may not, be efficient. Profile your code!)
* 3) Loop over all conferences:
* + Loop over all texts in the conference:
* + If the bit is already set, skip the text.
* + Retrieve the text status from the data base.
* + If it is old enough (in all the recipient conferences)
* delete it.
* else
* set the bit.
* + If it is too young to be deleted (only
* considering this conferene)
* + Set the bit for this text and all subsequent
* texts in this conference.
* 4) Loop over all remaining texts:
* + If the bit is not set,
* + delete the text. (It has no recipients).
* 5) Deallocate the bitmap and wait 24 hours.
*/
/*
* Delete old texts.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment